code: def __init__(
      self,
      io_loop,
      client,
      request,
      release_callback,
      final_callback,
      max_buffer_size,
      tcp_client,
      max_header_size,
      max_body_size,
  ):
      self.start_time = io_loop.time()
      self.io_loop = io_loop
      self.client = client
      self.request = request
      self.release_callback = release_callback
      self.final_callback = final_callback
      self.max_buffer_size = max_buffer_size
      self.tcp_client = tcp_client
      self.max_header_size = max_header_size
      self.max_body_size = max_body_size
      self.code = None
      self.headers = None
      self.chunks = []
      self._decompressor = None
      # Timeout handle returned by IOLoop.add_timeout
      self._timeout = None
      self._sockaddr = None
      with stack_context.ExceptionStackContext(self._handle_exception):
          self.parsed = urlparse.urlsplit(_unicode(self.request.url))
          if self.parsed.scheme not in ("http", "https"):
              raise ValueError(
                  "Unsupported url scheme: %s" % self.request.url
              )
          # urlsplit results have hostname and port results, but they
          # didn't support ipv6 literals until python 2.7.
          netloc = self.parsed.netloc
          if "@" in netloc:
              userpass, _, netloc = netloc.rpartition("@")
          host, port = httputil.split_host_and_port(netloc)
          if port is None:
              port = 443 if self.parsed.scheme == "https" else 80
          if re.match(r"^\[.*\]$", host):
              # raw ipv6 addresses in urls are enclosed in brackets
              host = host[1:-1]
          self.parsed_hostname = host  # save final host for _on_connect
  
          if request.allow_ipv6 is False:
              af = socket.AF_INET
          else:
              af = socket.AF_UNSPEC
  
          ssl_options = self._get_ssl_options(self.parsed.scheme)
  
          timeout = min(
              self.request.connect_timeout, self.request.request_timeout
          )
          if timeout:
              self._timeout = self.io_loop.add_timeout(
                  self.start_time + timeout,
                  stack_context.wrap(
                      functools.partial(
                          self._on_timeout, "while connecting"
                      )
                  ),
              )
          self.tcp_client.connect(
              host,
              port,
              af=af,
              ssl_options=ssl_options,
              max_buffer_size=self.max_buffer_size,
              callback=self._on_connect,
          )
  
imports: from __future__ import absolute_import, division, print_function
  from tornado.escape import utf8, _unicode
  from tornado import gen
  from tornado.httpclient import HTTPResponse, HTTPError, AsyncHTTPClient, main, _RequestProxy
  from tornado import httputil
  from tornado.http1connection import HTTP1Connection, HTTP1ConnectionParameters
  from tornado.iostream import StreamClosedError
  from tornado.netutil import Resolver, OverrideResolver, _client_ssl_defaults
  from tornado.log import gen_log
  from tornado import stack_context
  from tornado.tcpclient import TCPClient
  from tornado.util import PY3
  import base64
  import collections
  import copy
  import functools
  import re
  import socket
  import sys
  from io import BytesIO
label_desc: Use image node_id 1 to create a new _HTTPConnection object from inherited base classes: httputil with example: obj = _HTTPConnection(io_loop, client, request, release_callback, final_callback, max_buffer_size, tcp_client, max_header_size, max_body_size)