def _to_base_type(self, value):
    if self._compressed and isinstance(value, str):
      return _CompressedValue(zlib.compress(value))
dataset/ETHPy150Open GoogleCloudPlatform/datastore-ndb-python/ndb/model.py/GenericProperty._to_base_type/original