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: Merge the intermediate metric states.
docstr_tok: ["Merge","the","intermediate","metric","states","."]
code: def merge_accumulators(
      self, states: Sequence[_SamplewiseMeanAggFnState]
  ) -> _SamplewiseMeanAggFnState:
      """Merge the intermediate metric states."""
      states_iter = iter(states)
      result = next(states_iter)
      for state in states_iter:
          for metric in self.metrics:
              result[metric] += state[metric]
      return result
  
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 5 for calling the TopKSamplewiseMeanAggFn obj's underlying member method code with example usage: obj.merge_accumulators(states) and returns: result