code: def IncrementMetricsCallbacksCounters(
      pipeline: beam.Pipeline,
      metrics_callbacks: List[types.AddMetricsCallbackType],
      model_type: str,
  ) -> beam.PCollection[None]:
      """To track count of all the metrics being computed using TFMA."""
  
      def _MakeAndIncrementCounters(_):
          for callback in metrics_callbacks:
              if hasattr(callback, "name"):
                  _IncrementMetricsCounters(
                      callback.name, "v1", model_type
                  )
  
      return (
          pipeline
          | "CreateSole" >> beam.Create([None])
          | "Count" >> beam.Map(_MakeAndIncrementCounters)
      )
  
file_path: model-analysis/tensorflow_model_analysis/evaluators/counter_util.py
imports: from typing import List, Set
  import apache_beam
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.proto import config_pb2
label_desc: Use image node_id 2 for calling a global function with example usage: IncrementMetricsCallbacksCounters(pipeline, metrics_callbacks, model_type) and returns: unknown