code: def finish(self):
      data = b"".join(self.chunks)
      self._remove_timeout()
      original_request = getattr(
          self.request, "original_request", self.request
      )
      if self._should_follow_redirect():
          assert isinstance(self.request, _RequestProxy)
          new_request = copy.copy(self.request.request)
          new_request.url = urlparse.urljoin(
              self.request.url, self.headers["Location"]
          )
          new_request.max_redirects = self.request.max_redirects - 1
          del new_request.headers["Host"]
          # http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.4
          # Client SHOULD make a GET request after a 303.
          # According to the spec, 302 should be followed by the same
          # method as the original request, but in practice browsers
          # treat 302 the same as 303, and many servers use 302 for
          # compatibility with pre-HTTP/1.1 user agents which don't
          # understand the 303 status.
          if self.code in (302, 303):
              new_request.method = "GET"
              new_request.body = None
              for h in [
                  "Content-Length",
                  "Content-Type",
                  "Content-Encoding",
                  "Transfer-Encoding",
              ]:
                  try:
                      del self.request.headers[h]
                  except KeyError:
                      pass
          new_request.original_request = original_request
          final_callback = self.final_callback
          self.final_callback = None
          self._release()
          self.client.fetch(new_request, final_callback)
          self._on_end_request()
          return
      if self.request.streaming_callback:
          buffer = BytesIO()
      else:
          buffer = BytesIO(data)  # TODO: don't require one big string?
      response = HTTPResponse(
          original_request,
          self.code,
          reason=getattr(self, "reason", None),
          headers=self.headers,
          request_time=self.io_loop.time() - self.start_time,
          buffer=buffer,
          effective_url=self.request.url,
      )
      self._run_callback(response)
      self._on_end_request()
  
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 15 for calling the _HTTPConnection obj's underlying member method code with example usage: obj.finish() without return types