class_docstr: Trainer based on (R)ecorder and Task(M)anager.
  It can train a list of tasks and return a list of model recorders in a multiprocessing way.
  
  Assumption: `task` will be saved to TaskManager and `task` will be fetched and trained from TaskManager
class_docstr_tok: ["Trainer","based","on","(","R",")","ecorder","and","Task","(","M",")","anager",".","It","can","train","a","list","of","tasks","and","return","a","list","of","model","recorders","in","a","multiprocessing","way",".","Assumption",":","`","task","`","will","be","saved","to","TaskManager","and","`","task","`","will","be","fetched","and","trained","from","TaskManager"]
docstr: The multiprocessing method for `train`. It can share a same task_pool with `train` and can run in other progress or other machines.
  
  Args:
      train_func (Callable): the training method which needs at least `tasks` and `experiment_name`. None for the default training method.
      experiment_name (str): the experiment name, None for use default name.
docstr_tok: ["The","multiprocessing","method","for","`","train","`",".","It","can","share","a","same","task_pool","with","`","train","`","and","can","run","in","other","progress","or","other","machines",".","Args",":","train_func","(","Callable",")",":","the","training","method","which","needs","at","least","`","tasks","`","and","`","experiment_name","`",".","None","for","the","default","training","method",".","experiment_name","(","str",")",":","the","experiment","name",",","None","for","use","default","name","."]
code: def worker(
      self,
      train_func: Callable = None,
      experiment_name: str = None,
  ):
      """
      The multiprocessing method for `train`. It can share a same task_pool with `train` and can run in other progress or other machines.
  
      Args:
          train_func (Callable): the training method which needs at least `tasks` and `experiment_name`. None for the default training method.
          experiment_name (str): the experiment name, None for use default name.
      """
      if train_func is None:
          train_func = self.train_func
      if experiment_name is None:
          experiment_name = self.experiment_name
      task_pool = self.task_pool
      if task_pool is None:
          task_pool = experiment_name
      run_task(
          train_func,
          task_pool=task_pool,
          experiment_name=experiment_name,
      )
  
imports: import socket
  from typing import Callable, List, Optional
  from tqdm.auto import tqdm
  from qlib.config import C
  from qlib.data.dataset import Dataset
  from qlib.data.dataset.weight import Reweighter
  from qlib.log import get_module_logger
  from qlib.model.base import Model
  from qlib.utils import auto_filter_kwargs, fill_placeholder, flatten_dict, init_instance_by_config
  from qlib.utils.paral import call_in_subproc
  from qlib.workflow import R
  from qlib.workflow.recorder import Recorder
  from qlib.workflow.task.manage import TaskManager, run_task
label_desc: Use image node_id 4 for calling the TrainerRM obj's underlying member method code with example usage: obj.worker(train_func, experiment_name) without return types