def _to_entity(self, entity):
    for prop in self.properties().values():
      datastore_value = prop.get_value_for_datastore(self)
      if datastore_value == []:
        try:
          del entity[prop.name]
        except KeyError:
          pass
      else:
        entity[prop.name] = datastore_value

    entity.set_unindexed_properties(self._unindexed_properties)
Copies information from this model to provided entity.
dataset/ETHPy150Open CollabQ/CollabQ/.google_appengine/google/appengine/ext/db/__init__.py/Model._to_entity