def key(self):
    if self.is_saved():
      return self._entity.key()
    elif self._key:
      return self._key
    elif self._key_name:
      parent = self._parent_key or (self._parent and self._parent.key())
      self._key = Key.from_path(self.kind(), self._key_name, parent=parent)
      return self._key
    else:
      raise NotSavedError()
Called by Transports when they close unexpectedly, not as a result of
dataset/ETHPy150Open CollabQ/CollabQ/.google_appengine/google/appengine/ext/db/__init__.py/Model.key--crossover with--dataset/ETHPy150Open agoragames/haigha/haigha/connection.py/Connection.transport_closed