@functools.lru_cache()
def resolve_address(host, port):
 with support.transient_internet(host):
  return socket.getaddrinfo(host, port, socket.AF_INET, socket.SOCK_STREAM)[0][4]

@ functools . lru_cache ( ) def resolve_address ( host , port ) : with support . transient_internet ( host ) : return socket . getaddrinfo ( host , port , socket . AF_INET , socket . SOCK_STREAM ) [ 0 ] [ 4 ]
resolve an to an address .