code: def host_in_set (ip, hosts, nets):
      
      if ip in hosts:
          return True
      if is_valid_ipv4(ip):
          n = dq2num(ip)
          for net in nets:
              if dq_in_net(n, net):
                  return True
      return False
docs: Return True if given ip is in host or network list.