def _db_set_value(self, v, unused_p, value):
    if not isinstance(value, (bool, int, long)):
      raise TypeError('IntegerProperty %s can only be set to integer values; '
                      'received %r' % (self._name, value))
    v.set_int64value(value)
dataset/ETHPy150Open GoogleCloudPlatform/datastore-ndb-python/ndb/model.py/IntegerProperty._db_set_value/original