code: def create_client_socket(
      ctx, server_socket_address, heartbeat_timeout=False
  ):
      """Create a client socket to connect the `server_socket_address`
      (support raising timeout exception).
  
      Args:
          ctx(zmq.Context()): context of zmq
          server_socket_address(str): address of server socket
          heartbeat_timeout(bool): whether to set the timeout(HEARTBEAT_RCVTIMEO_S) for
                 sending operation on the client socket. (The default value is False)
  
      Returns:
          socket(zmq.Context().socket): socket of the client.
      """
      socket = ctx.socket(zmq.REQ)
      if heartbeat_timeout:
          socket.setsockopt(
              zmq.RCVTIMEO, remote_constants.HEARTBEAT_RCVTIMEO_S * 1000
          )
      socket.linger = 0
      socket.connect("tcp://{}".format(server_socket_address))
  
      return socket
  
imports: import zmq
  from parl.remote import remote_constants
label_desc: Use image node_id 2 for calling a global function with example usage: create_client_socket(ctx, server_socket_address, heartbeat_timeout) and returns: socket