docs: def close(self, code=3000, message='Go away!'):
          """Close session or endpoint connection.
  
          `code`
              Closing code
          `message`
              Close message
          """
          if self.state != CLOSED:
              try:
                  self.conn.on_close()
              except:
                  LOG.debug("Failed to call on_close().", exc_info=True)
              finally:
                  self.state = CLOSED
                  self.close_reason = (code, message)
                  self.conn = None
  
              # Bump stats
              self.stats.on_sess_closed(self.transport_name)
  
              # If we have active handler, notify that session was closed
              if self.handler is not None:
                  self.handler.session_closed()