code: def regressor_extra_metrics(features, labels, predictions):
      return {
          "my_mean_prediction": tf.compat.v1.metrics.mean(
              predictions["predictions"]
          ),
          "my_mean_age": tf.compat.v1.metrics.mean(features["age"]),
          "my_mean_label": tf.compat.v1.metrics.mean(labels),
          "my_mean_age_times_label": tf.compat.v1.metrics.mean(
              labels * features["age"]
          ),
      }
  
file_path: model-analysis/tensorflow_model_analysis/eval_saved_model/example_trainers/util.py
imports: import tensorflow
  from tensorflow_model_analysis.eval_saved_model import export
  from tensorflow_model_analysis.eval_saved_model import util
label_desc: Use image node_id 6 for calling a global function with example usage: regressor_extra_metrics(features, labels, predictions) and returns: dict