class_docstr: Group the objects based on dict
docstr: Group the ungrouped_dict into different groups.
  
  Args:
      ungrouped_dict (dict): the ungrouped dict waiting for grouping like {name: things}
  
  Returns:
      dict: grouped_dict like {G1: object, G2: object}
      n_jobs: how many progress you need.
      verbose: the print mode for Parallel.
code: def __call__(
      self,
      ungrouped_dict: dict,
      n_jobs: int = 1,
      verbose: int = 0,
      *args,
      **kwargs,
  ) -> dict:
      """
      Group the ungrouped_dict into different groups.
  
      Args:
          ungrouped_dict (dict): the ungrouped dict waiting for grouping like {name: things}
  
      Returns:
          dict: grouped_dict like {G1: object, G2: object}
          n_jobs: how many progress you need.
          verbose: the print mode for Parallel.
      """
  
      # NOTE: The multiprocessing will raise error if you use `Serializable`
      # Because the `Serializable` will affect the behaviors of pickle
      grouped_dict = self.group(ungrouped_dict, *args, **kwargs)
  
      key_l = []
      job_l = []
      for key, value in grouped_dict.items():
          key_l.append(key)
          job_l.append(delayed(Group.reduce)(self, value))
      return dict(
          zip(key_l, Parallel(n_jobs=n_jobs, verbose=verbose)(job_l))
      )
  
file_path: qlib/qlib/model/ens/group.py
imports: from qlib.model.ens.ensemble import Ensemble, RollingEnsemble
  from typing import Callable
  from joblib import Parallel, delayed
label_desc: Use image node_id 4 for calling the Group obj's underlying member method code with example usage: obj.__call__(ungrouped_dict, n_jobs, verbose) and returns: dict