code: def _families_and_addresses(self, hostname, port):
          
          guess = True
          addrinfos = socket.getaddrinfo(
              hostname, port, socket.AF_UNSPEC, socket.SOCK_STREAM
          )
          for (family, socktype, proto, canonname, sockaddr) in addrinfos:
              if socktype == socket.SOCK_STREAM:
                  yield family, sockaddr
                  guess = False
  
          # some OS like AIX don't indicate SOCK_STREAM support, so just
          # guess. :(  We only do this if we did not get a single result marked
          # as socktype == SOCK_STREAM.
          if guess:
              for family, _, _, _, sockaddr in addrinfos:
                  yield family, sockaddr
docs: Yield pairs of address families and addresses to try for connecting.
  
          :param str hostname: the server to connect to
          :param int port: the server port to connect to
          :returns: Yields an iterable of ``(family, address)`` tuples