code: def _create_multilabel_scorer(
      method: str,
      adjust_pred_probs: bool,
      aggregator_kwargs: Optional[Dict[str, Any]] = None,
  ) -> Tuple[MultilabelScorer, Dict]:
      """This function acts as a factory that creates a MultilabelScorer."""
      base_scorer = ClassLabelScorer.from_str(method)
      base_scorer_kwargs = {"adjust_pred_probs": adjust_pred_probs}
      if aggregator_kwargs:
          aggregator = Aggregator(**aggregator_kwargs)
          scorer = MultilabelScorer(base_scorer, aggregator)
      else:
          scorer = MultilabelScorer(base_scorer)
      return scorer, base_scorer_kwargs
  
file_path: cleanlab/cleanlab/multilabel_classification/rank.py
imports: from __future__ import annotations
  import numpy
  from typing import List, TypeVar, Dict, Any, Optional, Tuple, TYPE_CHECKING
  from cleanlab.internal.validation import assert_valid_inputs
  from cleanlab.internal.util import get_num_classes
  from cleanlab.internal.multilabel_utils import int2onehot
  from cleanlab.internal.multilabel_scorer import MultilabelScorer, ClassLabelScorer, Aggregator
label_desc: Use image node_id 2 for calling a global function with example usage: _create_multilabel_scorer(method, adjust_pred_probs, aggregator_kwargs) and returns: scorer,  base_scorer_kwargs