code: def connect(cls, host, port):
      family, socktype, proto, _, sockaddr = socket.getaddrinfo(
          host, port, socket.AF_INET, socket.SOCK_STREAM
      )
      try:
          sock = socket.socket(family=family, type=socktype)
          sock.settimeout(CONNECT_TIMEOUT)
          __try_op__("connect", sock.connect, CONNECT_RETRY, sockaddr)
          return cls(sock)
      except BaseException:
          sock.close()
          raise
  
file_path: metaflow/metaflow/plugins/env_escape/communication/socket_bytestream.py
imports: import errno
  import socket
  import sys
  from .bytestream import ByteStream
  from .utils import __try_op__
label_desc: Use image node_id 1 for calling the SocketByteStream obj's underlying member method code with example usage: obj.connect(cls, host, port) and returns: cls