def _to_entity(self, entity):
    """Copies information from this model to provided entity.

    Args:
      entity: Entity to save information on.
    """
    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)
dataset/ETHPy150Open CollabQ/CollabQ/.google_appengine/google/appengine/ext/db/__init__.py/Model._to_entity/original