code: def IncrementSliceSpecCounters(
      pipeline: beam.Pipeline,
  ) -> beam.PCollection[None]:
      """To track count of all slicing spec computed using TFMA."""
  
      def _MakeAndIncrementCounters(slice_list):
          for slice_key, slice_value in slice_list:
              # LINT.IfChange
              slice_name = "slice_computed_%s_%s" % (
                  slice_key,
                  slice_value,
              )
              # LINT.ThenChange(../../../../learning/fairness/infra/plx/scripts/tfma_metrics_computed_tracker_macros.sql)
              slice_counter = beam.metrics.Metrics.counter(
                  constants.METRICS_NAMESPACE, slice_name
              )
              slice_counter.inc(1)
  
      return (
          pipeline
          | "GetSliceCountKeys" >> beam.Keys()
          | "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 3 for calling a global function with example usage: IncrementSliceSpecCounters(pipeline) and returns: unknown