def _validate(self, value):
    if not isinstance(value, Flexidate):
      raise TypeError('expected Flexidate, got %r' % (value,))
dataset/ETHPy150Open GoogleCloudPlatform/datastore-ndb-python/samples/custom.py/FlexidateProperty._validate/original