class_docstr: Base class for the remote client.
  
  For each training task, there is a global client in the cluster which
  submits jobs to the master node. Different `@parl.remote_class` objects
  connect to the same global client in a training task.
  
  Attributes:
      submit_job_socket (zmq.Context.socket): A socket which submits job to
                                              the master node.
      pyfiles (bytes): A serialized dictionary containing the code of python
                       files in local working directory.
      executable_path (str): File path of the executable python script.
      start_time (time): A timestamp to record the start time of the program.
class_docstr_tok: ["Base","class","for","the","remote","client",".","For","each","training","task",",","there","is","a","global","client","in","the","cluster","which","submits","jobs","to","the","master","node",".","Different","`","@","parl.remote_class","`","objects","connect","to","the","same","global","client","in","a","training","task",".","Attributes",":","submit_job_socket","(","zmq.Context.socket",")",":","A","socket","which","submits","job","to","the","master","node",".","pyfiles","(","bytes",")",":","A","serialized","dictionary","containing","the","code","of","python","files","in","local","working","directory",".","executable_path","(","str",")",":","File","path","of","the","executable","python","script",".","start_time","(","time",")",":","A","timestamp","to","record","the","start","time","of","the","program","."]
docstr: Each client has 1 sockets as start:
  
  (1) submit_job_socket: submits jobs to master node.
docstr_tok: ["Each","client","has","1","sockets","as","start",":","(","1",")","submit_job_socket",":","submits","jobs","to","master","node","."]
code: def _create_sockets(self, master_address):
      """Each client has 1 sockets as start:
  
      (1) submit_job_socket: submits jobs to master node.
      """
  
      # submit_job_socket: submits job to master
      self.submit_job_socket = self.ctx.socket(zmq.REQ)
      self.submit_job_socket.linger = 0
      self.submit_job_socket.setsockopt(
          zmq.RCVTIMEO, remote_constants.HEARTBEAT_TIMEOUT_S * 1000
      )
      self.submit_job_socket.connect("tcp://{}".format(master_address))
      self.start_time = time.time()
  
      def master_heartbeat_exit_callback_func():
          logger.warning(
              "[Client] Cannot connect to the master. "
              "Please check if it is still alive."
          )
          logger.warning("Client exit replying heartbeat for master.")
          self.connected_to_master = False
  
      self.master_heartbeat_thread = HeartbeatServerThread(
          heartbeat_exit_callback_func=master_heartbeat_exit_callback_func
      )
      self.master_heartbeat_thread.setDaemon(True)
      self.master_heartbeat_thread.start()
      self.reply_master_heartbeat_address = (
          self.master_heartbeat_thread.get_address()
      )
      self.threads.append(self.master_heartbeat_thread)
  
      self.client_id = (
          self.reply_master_heartbeat_address.replace(":", "_")
          + "_"
          + str(int(time.time()))
      )
  
      # check if the master is connected properly
      try:
          self.submit_job_socket.send_multipart(
              [
                  remote_constants.CLIENT_CONNECT_TAG,
                  to_byte(self.reply_master_heartbeat_address),
                  to_byte(socket.gethostname()),
                  to_byte(self.client_id),
              ]
          )
          message = self.submit_job_socket.recv_multipart()
          self.log_monitor_url = to_str(message[1])
      except zmq.error.Again as e:
          logger.warning(
              "[Client] Can not connect to the master, please "
              "check if master is started and ensure the input "
              "address {} is correct.".format(master_address)
          )
          self.connected_to_master = False
          raise Exception(
              "Client can not connect to the master, please "
              "check if master is started and ensure the input "
              "address {} is correct.".format(master_address)
          )
  
imports: import cloudpickle
  import datetime
  import os
  import socket
  import sys
  import threading
  import zmq
  import parl
  import time
  import glob
  import multiprocessing
  from parl.utils import to_str, to_byte, get_ip_address, logger, isnotebook
  from parl.remote.utils import get_subfiles_recursively
  from parl.remote import remote_constants
  from parl.remote.grpc_heartbeat import HeartbeatServerThread, HeartbeatServerProcess
  from parl.remote.utils import get_version
label_desc: Use image node_id 5 for calling the Client obj's underlying member method code with example usage: obj._create_sockets(master_address) without return types