def _prepare_for_put(self, entity):
    if (self._auto_current_user or
        (self._auto_current_user_add and not self._has_value(entity))):
      value = users.get_current_user()
      if value is not None:
        self._store_value(entity, value)
dataset/ETHPy150Open GoogleCloudPlatform/datastore-ndb-python/ndb/model.py/UserProperty._prepare_for_put/original