def __Increment(self, stats_dict, count, stat_key, size,
                  builtin_index_count=0, builtin_index_size=0,
                  composite_index_count=0, composite_index_size=0, **kwds):

    if stat_key not in stats_dict:
      stat_model = stat_key[0](
          key=datastore_types.Key.from_path(stat_key[0].STORED_KIND_NAME,
                                            stat_key[1],
                                            namespace=stat_key[2],
                                            _app=self.app_id),
          _app=self.app_id)
      stats_dict[stat_key] = stat_model
      for field, value in kwds.iteritems():
        setattr(stat_model, field, value)
      stat_model.count = count
      if size:
        stat_model.entity_bytes = size
      if builtin_index_size:
        stat_model.builtin_index_bytes = builtin_index_size
        stat_model.builtin_index_count = builtin_index_count
      if composite_index_size:
        stat_model.composite_index_bytes = composite_index_size
        stat_model.composite_index_count = composite_index_count
      stat_model.bytes = size + builtin_index_size + composite_index_size
      stat_model.timestamp = self.timestamp
    else:
      stat_model = stats_dict[stat_key]
      stat_model.count += count
      if size:
        stat_model.entity_bytes += size
      if builtin_index_size:
        stat_model.builtin_index_bytes += builtin_index_size
        stat_model.builtin_index_count += builtin_index_count
      if composite_index_size:
        stat_model.composite_index_bytes += composite_index_size
        stat_model.composite_index_count += composite_index_count
      stat_model.bytes += size + builtin_index_size + composite_index_size
Increment stats for a particular kind.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/datastore/datastore_stats_generator.py/DatastoreStatsProcessor.__Increment