class_docstr: Worker provides the cpu computation resources for the cluster.
  
  A worker node is connected to the master node and will send its
  computation resources information to the master node. When a worker
  node is created, it will start `cpu_num` empty jobs and these jobs'
  ip addresses will be send to the master node. Further, when an old
  job is killed, worker will start a new job and send the new job ip
  address to the master node.
  
  To start a worker, we use the following xparl command line api:
  
  .. code-block:: python
  
      xparl connect --address localhost:1234 --cpu_num 8
  
  Attributes:
      master_address (str): Master's ip address.
      request_master_socket (zmq.Context.socket): A socket which sends job
                                                  address to the master node.
      reply_job_socket (zmq.Context.socket): A socket which receives
                                             job_address from the job.
      remove_job_socket (zmq.Context.socket): A socket that receives commands to remove the job from jobs immediately.
                                              Used to remove the dead job immediately and allocate a new job
                                              instead of waiting for the heartbeat failure.
      job_buffer (str): A buffer that stores initialized jobs for providing new jobs in a short time.
  
  Args:
      master_address (str): IP address of the master node.
      cpu_num (int): Number of cpu to be used on the worker.
      gpu (str): Comma separated list of GPU(s) to use.
docstr: Verify that the parl & python version as well as some other packages in 'worker' process
  matches that of the 'master' process
docstr_tok: ["Verify","that","the","parl","&","python","version","as","well","as","some","other","packages","in","'worker","'","process","matches","that","of","the","'master","'","process"]
code: def check_env_consistency(self):
      """Verify that the parl & python version as well as some other packages in 'worker' process
      matches that of the 'master' process"""
      self.request_master_socket.send_multipart(
          [remote_constants.CHECK_VERSION_TAG]
      )
      message = self.request_master_socket.recv_multipart()
      tag = message[0]
      if tag == remote_constants.NORMAL_TAG:
          worker_parl_version = parl.__version__
          worker_python_version_major = str(sys.version_info.major)
          worker_python_version_minor = str(sys.version_info.minor)
          assert (
              worker_parl_version == to_str(message[1])
              and worker_python_version_major == to_str(message[2])
              and worker_python_version_minor == to_str(message[3])
          ), """Version mismatch: the "master" is of version "parl={}, python={}.{}". However, \
                  "parl={}, python={}.{}"is provided in your environment.""".format(
              to_str(message[1]),
              to_str(message[2]),
              to_str(message[3]),
              worker_parl_version,
              worker_python_version_major,
              worker_python_version_minor,
          )
          worker_pyarrow_version = str(get_version("pyarrow"))
          master_pyarrow_version = to_str(message[4])
          if worker_pyarrow_version != master_pyarrow_version:
              if master_pyarrow_version == "None":
                  error_message = """"pyarrow" is provided in your current environment, however, it is not \
  found in "master"'s environment. To use "pyarrow" for serialization, please install \
  "pyarrow={}" in "master"'s environment!""".format(
                      worker_pyarrow_version
                  )
              elif worker_pyarrow_version == "None":
                  error_message = """"pyarrow" is provided in "master"'s environment, however, it is not \
  found in your current environment. To use "pyarrow" for serialization, please install \
  "pyarrow={}" in your current environment!""".format(
                      master_pyarrow_version
                  )
              else:
                  error_message = """Version mismatch: the 'master' is of version 'pyarrow={}'. However, \
  'pyarrow={}'is provided in your current environment.""".format(
                      master_pyarrow_version, worker_pyarrow_version
                  )
              raise Exception(error_message)
      else:
          raise NotImplementedError
  
imports: import cloudpickle
  import multiprocessing
  import os
  import psutil
  import signal
  import socket
  import subprocess
  import sys
  import tempfile
  import time
  import threading
  import warnings
  import zmq
  from datetime import datetime
  import pynvml
  import parl
  from parl.utils import get_ip_address, to_byte, to_str, logger, _IS_WINDOWS
  from parl.remote import remote_constants
  from parl.remote.message import InitializedWorker, AllocatedCpu, AllocatedGpu
  from parl.remote.status import WorkerStatus
  from parl.remote.zmq_utils import create_server_socket, create_client_socket
  from parl.remote.grpc_heartbeat import HeartbeatServerThread, HeartbeatClientThread
  from six.moves import queue
  from parl.remote.utils import get_version, XPARL_PYTHON
label_desc: Use image node_id 4 for calling the Worker obj's underlying member method code with example usage: obj.check_env_consistency() without return types