'Registers entity to delete from datastore.
Args:
entity: an entity, model instance, or key to delete.'

def delete(self, entity):

    key = _normalize_key(entity)
    key_size = len(key._ToPb().Encode())
    if ((self.deletes.length >= MAX_ENTITY_COUNT) or ((self.deletes.size + key_size) > self.max_pool_size)):
        self.__flush_deletes()
    self.deletes.append(key, key_size)
