code: def _clear_callbacks(self) -> None:
          
          self._write_callback = None
          self._write_future = None  # type: Optional[Future[None]]
          self._close_callback = None  # type: Optional[Callable[[], None]]
          if self.stream is not None:
              self.stream.set_close_callback(None)
docs: Clears the callback attributes.
  
          This allows the request handler to be garbage collected more
          quickly in CPython by breaking up reference cycles.