code: def load_remote_class(remote_class_info):
      """load a class given related info dumped in the client.
  
      Args:
        remote_class_info: [in_notebook, dumped_class_info]
                           - in_notebook: whether the remote class is implemented in the environments like notebook (e.g., ipython, notebook).
                           - dumped_class_info: information of dumped remote class (decided by `in_notebook`).
  
      Return:
        cls: the class to load
      """
  
      in_notebook, dumped_class_info = cloudpickle.loads(
          remote_class_info
      )
  
      if in_notebook:
          cls = dumped_class_info
      else:
          """
          dumped_class_info:
              file_name: specify the file to load the class
              class_name: specify the class to be loaded
              end_of_file: line ID to indicate the last line that defines the class.
              in_sys_path: whether the path of the remote class is in the environment path (sys.path).
              client_sys_path: the environment paths of the client
          """
          (
              file_name,
              class_name,
              end_of_file,
              in_sys_path,
              client_sys_path,
          ) = dumped_class_info
  
          with open(file_name + ".py") as t_file:
              code = t_file.readlines()
          code = simplify_code(code, end_of_file)
          # folder/xx.py -> folder/xparl_xx.py
          file_name = file_name.split(os.sep)
          prefix = os.sep.join(file_name[:-1])
          if prefix == "":
              prefix = "."
  
          # Add pid to fix:
          #    https://github.com/PaddlePaddle/PARL/issues/611
          #    Multiple jobs may write the same file when `in_sys_path` is True.
          new_file_name = "xparl_{}".format(os.getpid()) + file_name[-1]
          module_name = prefix + os.sep + new_file_name
          tmp_file_name = module_name + ".py"
          with open(tmp_file_name, "w") as t_file:
              for line in code:
                  t_file.write(line)
  
          if in_sys_path:
              # append the environment paths of the client to the current environment path.
              sys.path.extend(client_sys_path)
  
              # the path of the remote class is in the sys.path, we can import it directly.
              mod = __import__(new_file_name)
          else:
              module_name = module_name.lstrip("." + os.sep).replace(
                  os.sep, "."
              )
              mod = __import__(
                  module_name, globals(), locals(), [class_name], 0
              )
  
          cls = getattr(mod, class_name)
  
          os.remove(tmp_file_name)
      return cls
  
file_path: PARL/parl/remote/remote_class_serialization.py
imports: import os
  import cloudpickle
  import sys
  import inspect
  from parl.utils import isnotebook, format_uniform_path
label_desc: Use image node_id 5 for calling a global function with example usage: load_remote_class(remote_class_info) and returns: cls