class_docstr: Computes class weights from labels.
class_docstr_tok: ["Computes","class","weights","from","labels","."]
code: def __init__(
      self,
      key: metric_types.MetricKey,
      eval_config: Optional[config_pb2.EvalConfig],
      class_ids: List[int],
      example_weighted: bool,
  ):
      self._key = key
      self._eval_config = eval_config
      self._class_ids = class_ids
      self._example_weighted = example_weighted
  
file_path: model-analysis/tensorflow_model_analysis/metrics/aggregation.py
imports: from typing import Any, Dict, Iterable, List, Optional
  import apache_beam
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.metrics import metric_util
  from tensorflow_model_analysis.proto import config_pb2
label_desc: Use image node_id 1 to create a new _ClassWeightsFromLabelsCombiner object from inherited base classes: beam with example: obj = _ClassWeightsFromLabelsCombiner(key, eval_config, class_ids, example_weighted)