def _has_complete_key(self):
    return self._key is not None and self._key.id() is not None
Return whether this entity has a complete key.
dataset/ETHPy150Open GoogleCloudPlatform/datastore-ndb-python/ndb/model.py/Model._has_complete_key