code: def _remove_unsupported_tf_settings(
      metric_config: config_pb2.MetricConfig,
  ) -> config_pb2.MetricConfig:
      """Deletes unsupported TF settings from config.
  
      Removes TF config settings that TFMA only supports default values for because
      the parameters are not supported by the TFMA implementation of the metric.
  
      Args:
        metric_config: Metric config.
  
      Returns:
        Updated metric config with unsupported settings removed.
      """
      cfg = _metric_config(metric_config.config)
      for cls_name, settings in _UNSUPPORTED_TF_SETTINGS.items():
          if not cls_name or cls_name == metric_config.class_name:
              for param in settings:
                  if param in cfg:
                      del cfg[param]
  
      return config_pb2.MetricConfig(
          class_name=metric_config.class_name,
          config=json.dumps(cfg, sort_keys=True),
      )
  
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 22 for calling a global function with example usage: _remove_unsupported_tf_settings(metric_config) and returns: config_pb2