def delete(self, entity):
    """Registers entity to delete from datastore.

    Args:
      entity: an entity, model instance, or key to delete.
    """

    key = _normalize_key(entity)
    if key is None:
      return self.ndb_delete(entity)
    key_size = len(key._ToPb().Encode())
    if (self.deletes.length >= self.max_entity_count or
        (self.deletes.size + key_size) > self.max_pool_size):
      self.__flush_deletes()
    self.deletes.append(key, key_size)
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/mapreduce/context.py/MutationPool.delete/original