class_docstr: ConfusionMatrix aggregate.
  
  Attributes:
    pos_label: the value considered as positive, default to 1.
    input_type: input encoding type, must be one of `InputType`.
    average: average type, must be one of `AverageType`.
    vocab: an external vocabulary that maps categorical value to integer class
      id. This is required if computed distributed (when merge_accumulators is
      called) and the average is macro where the class id mapping needs to be
      stable.
    dtype: dtype of the confusion matrix and all computations. Default to None
      as it is inferred.
class_docstr_tok: ["ConfusionMatrix","aggregate",".","Attributes",":","pos_label",":","the","value","considered","as","positive",",","default","to","1.","input_type",":","input","encoding","type",",","must","be","one","of","`","InputType","`",".","average",":","average","type",",","must","be","one","of","`","AverageType","`",".","vocab",":","an","external","vocabulary","that","maps","categorical","value","to","integer","class","id",".","This","is","required","if","computed","distributed","(","when","merge_accumulators","is","called",")","and","the","average","is","macro","where","the","class","id","mapping","needs","to","be","stable",".","dtype",":","dtype","of","the","confusion","matrix","and","all","computations",".","Default","to","None","as","it","is","inferred","."]
code: def add_inputs(
      self, state: ConfusionMatrixAggState | None, *inputs: Any
  ) -> ConfusionMatrixAggState:
      cm = self._calculate_confusion_matrix(*inputs)
      return (cm + state) if state else cm
  
imports: from collections.abc import Iterable, Sequence
  import dataclasses
  import enum
  import itertools
  from typing import Any
  import numpy
  from numpy import typing
  from tensorflow_model_analysis.experimental.lazytf import api
label_desc: Use image node_id 3 for calling the ConfusionMatrixAggFn obj's underlying member method code with example usage: obj.add_inputs(state) and returns: unknown