code: def host_to_ips(host):
      '''
      Returns a list of IP addresses of a given hostname or None if not found.
      '''
      ips = []
      try:
          for family, socktype, proto, canonname, sockaddr in socket.getaddrinfo(
                  host, 0, socket.AF_UNSPEC, socket.SOCK_STREAM):
              if family == socket.AF_INET:
                  ip, port = sockaddr
              elif family == socket.AF_INET6:
                  ip, port, flow_info, scope_id = sockaddr
              ips.append(ip)
          if not ips:
              ips = None
      except Exception:
          ips = None
      return ipf host_to_ips(host):
      '''
      Returns a list of IP addresses of a given hostname or None if not found.
      '''
      ips = []
      try:
          for family, socktype, proto, canonname, sockaddr in socket.getaddrinfo(
                  host, 0, socket.AF_UNSPEC, socket.SOCK_STREAM):
              if family == socket.AF_INET:
                  ip, port = sockaddr
              elif family == socket.AF_INET6:
                  ip, port, flow_info, scope_id = sockaddr
              ips.append(ip)
          if not ips:
              ips = None
      except Exception:
          ips = None
      return ips
docs: Returns a list of IP addresses of a given hostname or None if not found.