code: def write_http_response(
          self, status: http.HTTPStatus, headers: Headers, body: Optional[bytes] = None
      ) -> None:
          
          self.response_headers = headers
  
          logger.debug("%s > HTTP/1.1 %d %s", self.side, status.value, status.phrase)
          logger.debug("%s > %r", self.side, headers)
  
          # Since the status line and headers only contain ASCII characters,
          # we can keep this simple.
          response = f"HTTP/1.1 {status.value} {status.phrase}\r\n"
          response += str(headers)
  
          self.writer.write(response.encode())
  
          if body is not None:
              logger.debug("%s > Body (%d bytes)", self.side, len(body))
              self.writer.write(body)
docs: Write status line and headers to the HTTP response.
  
          This coroutine is also able to write a response body.