code: def _tf_class_and_config(
      metric_config: config_pb2.MetricConfig,
  ) -> Tuple[str, Dict[str, Any]]:
      """Returns the tensorflow class and config associated with metric_config."""
      cls_name = metric_config.class_name
      cfg = _metric_config(metric_config.config)
  
      # The same metric type may be used for different keys when multi-class metrics
      # are used (e.g. AUC for class0, # class1, etc). TF tries to generate unique
      # metric names even though these metrics are already unique within a
      # MetricKey. To workaround this issue, if a name is not set, then add a
      # default name ourselves.
      return cls_name, _maybe_add_name_to_config(cfg, cls_name)
  
imports: import collections
  import importlib
  import json
  import re
  from typing import Any, Dict, FrozenSet, Iterable, Iterator, List, NamedTuple, Optional, Tuple, Type, Union
  import tensorflow
  from tensorflow_model_analysis.metrics import aggregation
  from tensorflow_model_analysis.metrics import binary_confusion_matrices
  from tensorflow_model_analysis.metrics import calibration
  from tensorflow_model_analysis.metrics import calibration_plot
  from tensorflow_model_analysis.metrics import confusion_matrix_metrics
  from tensorflow_model_analysis.metrics import confusion_matrix_plot
  from tensorflow_model_analysis.metrics import example_count
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.metrics import metric_util
  from tensorflow_model_analysis.metrics import multi_class_confusion_matrix_plot
  from tensorflow_model_analysis.metrics import tf_metric_wrapper
  from tensorflow_model_analysis.metrics import weighted_example_count
  from tensorflow_model_analysis.proto import config_pb2
  from tensorflow_model_analysis.slicer import slicer_lib
  from tensorflow_model_analysis.utils import model_util
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 25 for calling a global function with example usage: _tf_class_and_config(metric_config) and returns: cls_name,  _maybe_add_name_to_config