class_docstr: Computes binary confusion matrix.
code: def _merge_entry(
      self,
      accumulator: MatrixAccumulator,
      threshold: float,
      entry: _ThresholdEntry,
  ) -> _ThresholdEntry:
      if threshold not in accumulator:
          return entry
  
      return _ThresholdEntry(
          matrix=Matrix(
              tp=accumulator[threshold].matrix.tp + entry.matrix.tp,
              tn=accumulator[threshold].matrix.tn + entry.matrix.tn,
              fp=accumulator[threshold].matrix.fp + entry.matrix.fp,
              fn=accumulator[threshold].matrix.fn + entry.matrix.fn,
          ),
          tp_examples=self._merge_example_ids(
              accumulator[threshold].tp_examples, entry.tp_examples
          ),
          tn_examples=self._merge_example_ids(
              accumulator[threshold].tn_examples, entry.tn_examples
          ),
          fp_examples=self._merge_example_ids(
              accumulator[threshold].fp_examples, entry.fp_examples
          ),
          fn_examples=self._merge_example_ids(
              accumulator[threshold].fn_examples, entry.fn_examples
          ),
      )
  
file_path: model-analysis/tensorflow_model_analysis/contrib/aggregates/binary_confusion_matrices.py
imports: from typing import Dict, Iterable, List, NamedTuple, Optional, Sequence
  from tensorflow_model_analysis.experimental.lazytf import api
label_desc: Use image node_id 4 for calling the BinaryConfusionMatrices obj's underlying member method code with example usage: obj._merge_entry(accumulator, threshold, entry) and returns: _ThresholdEntry, entry