code: def eval_metric_fns():
      """Returns a dict from name to metric functions."""
      metric_fns = {}
      metric_fns.update(
          {
              "metric/%s"
              % name: tfr.metrics.make_ranking_metric_fn(name)
              for name in [
                  tfr.metrics.RankingMetricKey.ARP,
                  tfr.metrics.RankingMetricKey.ORDERED_PAIR_ACCURACY,
              ]
          }
      )
      metric_fns.update(
          {
              "metric/ndcg@%d"
              % topn: tfr.metrics.make_ranking_metric_fn(
                  tfr.metrics.RankingMetricKey.NDCG, topn=topn
              )
              for topn in [1, 3, 5, 10]
          }
      )
      for topn in [1, 3, 5, 10]:
          metric_fns[
              "metric/weighted_ndcg@%d" % topn
          ] = tfr.metrics.make_ranking_metric_fn(
              tfr.metrics.RankingMetricKey.NDCG,
              weights_feature_name=FLAGS.weights_feature_name,
              topn=topn,
          )
      return metric_fns
  
file_path: ranking/tensorflow_ranking/examples/tf_ranking_tfrecord.py
imports: from absl import flags
  import tensorflow
  from tensorflow import estimator
  import tensorflow_ranking
label_desc: Use image node_id 7 for calling a global function with example usage: eval_metric_fns() and returns: metric_fns