code: def host(name, ip4=True, ip6=True, **kwargs):
      '''
      Return a list of addresses for name
  
      ip6:
          Return IPv6 addresses
      ip4:
          Return IPv4 addresses
  
      the rest is passed on to lookup()
      '''
      res = {}
      if ip6:
          ip6 = lookup(name, 'AAAA', **kwargs)
          if ip6:
              res['ip6'] = ip6
      if ip4:
          ip4 = lookup(name, 'A', **kwargs)
          if ip4:
              res['ip4'] = ip4
  
      return ref host(name, ip4=True, ip6=True, **kwargs):
      '''
      Return a list of addresses for name
  
      ip6:
          Return IPv6 addresses
      ip4:
          Return IPv4 addresses
  
      the rest is passed on to lookup()
      '''
      res = {}
      if ip6:
          ip6 = lookup(name, 'AAAA', **kwargs)
          if ip6:
              res['ip6'] = ip6
      if ip4:
          ip4 = lookup(name, 'A', **kwargs)
          if ip4:
              res['ip4'] = ip4
  
      return res
docs: Return a list of addresses for name
  
      ip6:
          Return IPv6 addresses
      ip4:
          Return IPv4 addresses
  
      the rest is passed on to lookup()