code: def is_closing(self) -> bool:
          
          return self.stream.closed() or self.client_terminated or self.server_terminated
docs: Return ``True`` if this connection is closing.
  
          The connection is considered closing if either side has
          initiated its closing handshake or if the stream has been
          shut down uncleanly.