'Copies information from this model to provided entity.
Args:
entity: Entity to save information on.'

def _to_entity(self, entity):

    for prop in self.properties().values():
        self.__set_property(entity, prop.name, prop.get_value_for_datastore(self))
    set_unindexed_properties = getattr(entity, 'set_unindexed_properties', None)
    if set_unindexed_properties:
        set_unindexed_properties(self._unindexed_properties)
