def increment(self, parts=None):
    if parts:
      self.__make_parent_node()
      return self.__sub_counters[parts[0]].increment(parts[1:])
    if self.__is_parent_node():
      # Move all children forward
      value = self.get() + 1
      self._set(value)
      return value
    self.__counter += 1
    return self.__counter
dataset/ETHPy150Open GoogleCloudPlatform/datastore-ndb-python/ndb/model.py/_NestedCounter.increment/original