

def _from_base_type(self, value):
    if (not isinstance(value, self._modelclass)):
        pb = entity_pb.EntityProto()
        pb.MergePartialFromString(value)
        if (not self._keep_keys):
            pb.clear_key()
        return self._modelclass._from_pb(pb)

dataset/ETHPy150Open GoogleCloudPlatform/datastore-ndb-python/ndb/model.py LocalStructuredProperty._from_base_type/original