def _opt_call_to_base_type(self, value):
    if not isinstance(value, _BaseValue):
      value = _BaseValue(self._call_to_base_type(value))
    return value
Call _to_base_type() if necessary.
dataset/ETHPy150Open GoogleCloudPlatform/datastore-ndb-python/ndb/model.py/Property._opt_call_to_base_type