class_docstr: Creates multi-label confusion matrix at thresholds from standard inputs.
class_docstr_tok: ["Creates","multi-label","confusion","matrix","at","thresholds","from","standard","inputs","."]
code: def merge_accumulators(
      self, accumulators: Iterable[_Matrices]
  ) -> _Matrices:
      accumulators = iter(accumulators)
      result = next(accumulators)
      for accumulator in accumulators:
          for threshold, matrix in accumulator.items():
              if threshold not in result:
                  result[threshold] = {}
              for k, v in matrix.items():
                  if k in result[threshold]:
                      result[threshold][
                          k
                      ].false_negatives += v.false_negatives
                      result[threshold][
                          k
                      ].true_negatives += v.true_negatives
                      result[threshold][
                          k
                      ].false_positives += v.false_positives
                      result[threshold][
                          k
                      ].true_positives += v.true_positives
                  else:
                      result[threshold][k] = v
      return result
  
file_path: model-analysis/tensorflow_model_analysis/metrics/multi_label_confusion_matrix_plot.py
imports: from typing import Dict, Iterable, List, Optional, NamedTuple
  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
  from tensorflow_model_analysis.proto import metrics_for_slice_pb2
label_desc: Use image node_id 4 for calling the _MultiLabelConfusionMatrixPlotCombiner obj's underlying member method code with example usage: obj.merge_accumulators(accumulators) and returns: result