code: def init_task_handler(task: dict) -> DataHandler:
      """
      initialize the handler part of the task **inplace**
  
      Parameters
      ----------
      task : dict
          the task to be handled
  
      Returns
      -------
      Union[DataHandler, None]:
          returns
      """
      # avoid recursive import
      from .handler import DataHandler  # pylint: disable=C0415
  
      h_conf = task["dataset"]["kwargs"].get("handler")
      if h_conf is not None:
          handler = init_instance_by_config(
              h_conf, accept_types=DataHandler
          )
          task["dataset"]["kwargs"]["handler"] = handler
          return handler
      else:
          raise ValueError("The task does not contains a handler part.")
  
file_path: qlib/qlib/data/dataset/utils.py
imports: from __future__ import annotations
  import pandas
  from typing import Union, List, TYPE_CHECKING
  from qlib.utils import init_instance_by_config
label_desc: Use image node_id 5 for calling a global function with example usage: init_task_handler(task) and returns: handler