class_docstr: A non-blocking TCP connection factory.
  
  .. versionchanged:: 4.1
     The ``io_loop`` argument is deprecated.
code: def _create_stream(
      self, max_buffer_size, af, addr, source_ip=None, source_port=None
  ):
      # Always connect in plaintext; we'll convert to ssl if necessary
      # after one connection has completed.
      source_port_bind = (
          source_port if isinstance(source_port, int) else 0
      )
      source_ip_bind = source_ip
      if source_port_bind and not source_ip:
          # User required a specific port, but did not specify
          # a certain source IP, will bind to the default loopback.
          source_ip_bind = (
              "::1" if af == socket.AF_INET6 else "127.0.0.1"
          )
          # Trying to use the same address family as the requested af socket:
          # - 127.0.0.1 for IPv4
          # - ::1 for IPv6
      socket_obj = socket.socket(af)
      set_close_exec(socket_obj.fileno())
      if source_port_bind or source_ip_bind:
          # If the user requires binding also to a specific IP/port.
          try:
              socket_obj.bind((source_ip_bind, source_port_bind))
          except socket.error:
              socket_obj.close()
              # Fail loudly if unable to use the IP/port.
              raise
      try:
          stream = IOStream(
              socket_obj,
              io_loop=self.io_loop,
              max_buffer_size=max_buffer_size,
          )
      except socket.error as e:
          fu = Future()
          fu.set_exception(e)
          return fu
      else:
          return stream.connect(addr)
  
imports: from __future__ import absolute_import, division, print_function
  import functools
  import socket
  from tornado.concurrent import Future
  from tornado.ioloop import IOLoop
  from tornado.iostream import IOStream
  from tornado import gen
  from tornado.netutil import Resolver
  from tornado.platform.auto import set_close_exec
label_desc: Use image node_id 4 for calling the TCPClient obj's underlying member method code with example usage: obj._create_stream(max_buffer_size, af, addr, source_ip, source_port) and returns: stream, fu