class_docstr: Combines compilable metric weights and computes result.
class_docstr_tok: ["Combines","compilable","metric","weights","and","computes","result","."]
code: def _process_batch(
      self,
      accumulator: tf_metric_accumulators.TFCompilableMetricsAccumulator,
  ):
      if accumulator.len_inputs() == 0:
          return
      self._batch_size_beam_metric.update(accumulator.len_inputs())
      self._total_input_byte_size_beam_metric.update(
          accumulator.get_size_estimate()
      )
      for output_index, output_name in enumerate(self._output_names):
          inputs = accumulator.get_inputs(output_index)
          for metric_index, metric in enumerate(
              self._metrics[output_name]
          ):
              try:
                  metric.reset_states()
                  metric.update_state(*inputs)
              except Exception as e:
                  raise ValueError(
                      f"TF Metric {metric.name} fails to update with inputs:\n{inputs},"
                      f"\nMetric full config: {metric.get_config()}"
                  ) from e
              accumulator.add_weights(
                  output_index, metric_index, metric.get_weights()
              )
      accumulator.clear_inputs()
  
imports: import collections
  import importlib
  import itertools
  from typing import Any, Dict, Iterable, List, Optional, Type, Tuple, Union
  import apache_beam
  import numpy
  import tensorflow
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.metrics import binary_confusion_matrices
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.metrics import metric_util
  from tensorflow_model_analysis.metrics import tf_metric_accumulators
  from tensorflow_model_analysis.proto import config_pb2
  from tensorflow_model_analysis.utils import model_util
label_desc: Use image node_id 3 for calling the _CompilableMetricsCombiner obj's underlying member method code with example usage: obj._process_batch(accumulator) without return types