class_docstr: TopK sample mean aggregate.
  
  Attributes:
    k_list: topk list used to truncate prediction. E.g., in an retrieval results
      of ['dog', 'cat', 'pig'], k=[2] means only ['dog', 'cat'] is used as the
      prediction. The default is None, which means all outputs in each
      prediction is included. Effectively k=None is same as k=[inf].
    metrics: The metrics to be computed.
    input_type: input encoding type, must be multiclass(-multioutput).
docstr: Updated the intermediate states by batches.
docstr_tok: ["Updated","the","intermediate","states","by","batches","."]
code: def add_inputs(
      self, mean_states: _SamplewiseMeanAggFnState, y_trues, y_preds
  ) -> _SamplewiseMeanAggFnState:
      """Updated the intermediate states by batches."""
      tp_metric = self._compute_metric_states(y_trues, y_preds)
      return self.merge_accumulators((mean_states, tp_metric))
  
imports: from collections.abc import Sequence
  import dataclasses
  from typing import Any
  import numpy
  from numpy import typing
  from tensorflow_model_analysis.experimental.lazytf import api
  from tensorflow_model_analysis.experimental.metrics.aggregates import _classification
label_desc: Use image node_id 4 for calling the TopKSamplewiseMeanAggFn obj's underlying member method code with example usage: obj.add_inputs(mean_states, y_trues, y_preds) and returns: self