class_docstr: A stateless implementation of the "Happy Eyeballs" algorithm.
  
  "Happy Eyeballs" is documented in RFC6555 as the recommended practice
  for when both IPv4 and IPv6 addresses are available.
  
  In this implementation, we partition the addresses by family, and
  make the first connection attempt to whichever address was
  returned first by ``getaddrinfo``.  If that connection fails or
  times out, we begin a connection in parallel to the first address
  of the other family.  If there are additional failures we retry
  with other addresses, keeping one connection attempt per family
  in flight at a time.
  
  http://tools.ietf.org/html/rfc6555
docstr: Partition the ``addrinfo`` list by address family.
  
  Returns two lists.  The first list contains the first entry from
  ``addrinfo`` and all others with the same family, and the
  second list contains all other addresses (normally one list will
  be AF_INET and the other AF_INET6, although non-standard resolvers
  may return additional families).
docstr_tok: ["Partition","the","``","addrinfo","``","list","by","address","family",".","Returns","two","lists",".","The","first","list","contains","the","first","entry","from","``","addrinfo","``","and","all","others","with","the","same","family",",","and","the","second","list","contains","all","other","addresses","(","normally","one","list","will","be","AF_INET","and","the","other","AF_INET6",",","although","non-standard","resolvers","may","return","additional","families",")","."]
code: def split(addrinfo):
      """Partition the ``addrinfo`` list by address family.
  
      Returns two lists.  The first list contains the first entry from
      ``addrinfo`` and all others with the same family, and the
      second list contains all other addresses (normally one list will
      be AF_INET and the other AF_INET6, although non-standard resolvers
      may return additional families).
      """
      primary = []
      secondary = []
      primary_af = addrinfo[0][0]
      for af, addr in addrinfo:
          if af == primary_af:
              primary.append((af, addr))
          else:
              secondary.append((af, addr))
      return primary, secondary
  
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 2 for calling the _Connector obj's underlying member method code with example usage: obj.split(addrinfo) and returns: primary,  secondary