code: def IncrementMetricsSpecsCounters(
      pipeline: beam.Pipeline,
      metrics_specs: List[config_pb2.MetricsSpec],
      model_types: Set[str],
  ) -> beam.PCollection[None]:
      """To track count of all metrics specs in TFMA."""
  
      def _MakeAndIncrementCounters(_):
          for model_type in model_types:
              for metrics_spec in metrics_specs:
                  for metric in metrics_spec.metrics:
                      _IncrementMetricsCounters(
                          metric.class_name, "v2", 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 4 for calling a global function with example usage: IncrementMetricsSpecsCounters(pipeline, metrics_specs, model_types) and returns: unknown