code: def _exe_task(task_config: dict):
      rec = R.get_recorder()
      # model & dataset initiation
      model: Model = init_instance_by_config(
          task_config["model"], accept_types=Model
      )
      dataset: Dataset = init_instance_by_config(
          task_config["dataset"], accept_types=Dataset
      )
      reweighter: Reweighter = task_config.get("reweighter", None)
      # model training
      auto_filter_kwargs(model.fit)(dataset, reweighter=reweighter)
      R.save_objects(**{"params.pkl": model})
      # this dataset is saved for online inference. So the concrete data should not be dumped
      dataset.config(dump_all=False, recursive=True)
      R.save_objects(**{"dataset": dataset})
      # fill placehorder
      placehorder_value = {"<MODEL>": model, "<DATASET>": dataset}
      task_config = fill_placeholder(task_config, placehorder_value)
      # generate records: prediction, backtest, and analysis
      records = task_config.get("record", [])
      if isinstance(records, dict):  # prevent only one dict
          records = [records]
      for record in records:
          # Some recorder require the parameter `model` and `dataset`.
          # try to automatically pass in them to the initialization function
          # to make defining the tasking easier
          r = init_instance_by_config(
              record,
              recorder=rec,
              default_module="qlib.workflow.record_temp",
              try_kwargs={"model": model, "dataset": dataset},
          )
          r.generate()
  
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 2 for calling a global function with example usage: _exe_task(task_config) without return types