class_docstr: Helper class for aggregating the label quality scores for each class into a single score for each datapoint.
  
  Parameters
  ----------
  method:
      The method to compute the label quality scores for each class.
      If passed as a callable, your function should take in a 1D array of K scores and return a single aggregated score.
      See `~cleanlab.internal.multilabel_scorer.exponential_moving_average` for an example of such a function.
      Alternatively, this can be a str value to specify a built-in function, possible values are the keys of the ``Aggregator``'s `possible_methods` attribute.
  
  kwargs:
      Additional keyword arguments to pass to the aggregation function when it is called.
class_docstr_tok: ["Helper","class","for","aggregating","the","label","quality","scores","for","each","class","into","a","single","score","for","each","datapoint",".","Parameters","--","--","--","--","--","method",":","The","method","to","compute","the","label","quality","scores","for","each","class",".","If","passed","as","a","callable",",","your","function","should","take","in","a","1D","array","of","K","scores","and","return","a","single","aggregated","score",".","See","`","~cleanlab.internal.multilabel_scorer.exponential_moving_average","`","for","an","example","of","such","a","function",".","Alternatively",",","this","can","be","a","str","value","to","specify","a","built-in","function",",","possible","values","are","the","keys","of","the","``","Aggregator","``","'s","`","possible_methods","`","attribute",".","kwargs",":","Additional","keyword","arguments","to","pass","to","the","aggregation","function","when","it","is","called","."]
code: def _validate_method(method) -> None:
      if not callable(method):
          raise TypeError(
              f"Expected callable method, got {type(method)}"
          )
  
imports: from enum import Enum
  from typing import Callable, Dict, Optional, Union
  import numpy
  from sklearn.model_selection import cross_val_predict
  from cleanlab.internal.multilabel_utils import _is_multilabel, stack_complement
  from cleanlab.internal.label_quality_utils import _subtract_confident_thresholds
  from cleanlab.internal.numerics import softmax
  from cleanlab.rank import get_self_confidence_for_each_label, get_normalized_margin_for_each_label, get_confidence_weighted_entropy_for_each_label
label_desc: Use image node_id 2 for calling the Aggregator obj's underlying member method code with example usage: obj._validate_method(method) without return types