code: def create_eager_metrics_for_problem(problem, model_hparams):
      """See create_eager_metrics."""
      metric_fns = problem.eval_metric_fns(model_hparams)
      problem_hparams = problem.get_hparams(model_hparams)
      target_modality = problem_hparams.modality["targets"]
      weights_fn = model_hparams.weights_fn.get(
          "targets", modalities.get_weights_fn(target_modality)
      )
      return create_eager_metrics_internal(
          metric_fns, weights_fn=weights_fn
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import six
  from tensor2tensor.layers import common_layers
  from tensor2tensor.layers import modalities
  from tensor2tensor.utils import bleu_hook
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import rouge
  from tensor2tensor.utils import sari_hook
  import tensorflow.compat.v1
  from tensorflow.python.util import tf_inspect
label_desc: Use image node_id 33 for calling a global function with example usage: create_eager_metrics_for_problem(problem, model_hparams) and returns: create_eager_metrics_internal