code: def getaddrinfo(node, service=0, family=0, socktype=0, protocol=0, flags=0, timeout=30):
      
      hub = get_hub()
      with switch_back(timeout) as switcher:
          request = pyuv.dns.getaddrinfo(hub.loop, node, service, family,
                                         socktype, protocol, flags, callback=switcher)
          switcher.add_cleanup(request.cancel)
          result = hub.switch()
      result, error = result[0]
      if error:
          message = pyuv.errno.strerror(error)
          raise pyuv.error.UVError(error, message)
      return result
docs: Resolve an Internet *node* name and *service* into a socket address.
  
      The *family*, *socktype* and *protocol* are optional arguments that specify
      the address family, socket type and protocol, respectively. The *flags*
      argument allows you to pass flags to further modify the resolution process.
      See the :func:`socket.getaddrinfo` function for a detailed description of
      these arguments.
  
      The return value is a list of ``(family, socktype, proto, canonname,
      sockaddr)`` tuples. The fifth element (``sockaddr``) is the socket address.
      It will be a 2-tuple ``(addr, port)`` for an IPv4 address, and a 4-tuple
      ``(addr, port, flowinfo, scopeid)`` for an IPv6 address.
  
      The address resolution is performed in the libuv thread pool.