code: def resolve_address(host, port):
      """Resolve an (host, port) to an address.
  
      We must perform name resolution before timeout tests, otherwise it will be
      performed by connect().
      """
      with socket_helper.transient_internet(host):
          return socket.getaddrinfo(
              host, port, socket.AF_INET, socket.SOCK_STREAM
          )[0][4]
  
imports: import functools
  import unittest
  from test import support
  from test.support import socket_helper
  import time
  import errno
  import socket
label_desc: Use image node_id 1 for calling a global function with example usage: resolve_address(host, port) and returns: socket