code: def close(self):
          
          if self._server is None:
              raise RuntimeError('Server is not started')
          self._server.close()
          for handler in self._handlers:
              handler.close()
docs: Stops accepting new connections, cancels all currently running
          requests. Request handlers are able to handle `CancelledError` and
          exit properly.