code: def _maybe_add_fn_name(kv, name):
      # Check new Keras version behavior per b/272542795#comment17.
      if "fn" in tf.keras.losses.MeanAbsoluteError().get_config():
          kv["fn"] = name
      return kv
  
file_path: model-analysis/tensorflow_model_analysis/metrics/metric_specs_test.py
imports: import json
  import tensorflow
  from tensorflow_model_analysis.metrics import calibration
  from tensorflow_model_analysis.metrics import confusion_matrix_metrics
  from tensorflow_model_analysis.metrics import mean_regression_error
  from tensorflow_model_analysis.metrics import metric_specs
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.proto import config_pb2
label_desc: Use image node_id 1 for calling a global function with example usage: _maybe_add_fn_name(kv, name) and returns: kv