

def put(self, entity):
    'Registers entity to put to datastore.\n\n    Args:\n      entity: an entity or model instance to put.\n    '
    actual_entity = _normalize_entity(entity)
    entity_size = len(actual_entity._ToPb().Encode())
    if ((self.puts.length >= MAX_ENTITY_COUNT) or ((self.puts.size + entity_size) > entity.max_pool_size)):
        self.__flush_puts()
    self.puts.append(actual_entity, entity_size)

dataset/ETHPy150Open livid/v2ex/mapreduce/context.py MutationPool.put/VarMisuse@59/120 `self`->`entity`