code: def test_evaluate_invalid_metric(self):
      with context.graph_mode():
          input_fn = tu.dummy_input_fn([[1.0, 2]], [[3.0]])
          _, labels = input_fn()
          predictions = [labels * 2, labels * 3]
          metrics = []
          for preds in predictions:
              metrics.append(
                  {
                      "mse": tf_compat.v1.metrics.mean_squared_error(
                          labels, preds
                      ),
                      "other_metric_1": (
                          tf.constant(1),
                          tf.constant(1),
                      ),
                      "other_metric_2": (
                          tf.constant(2),
                          tf.constant(2),
                      ),
                  }
              )
  
          with self.test_session() as sess:
              evaluator = Evaluator(
                  input_fn=input_fn, metric_name="dne", steps=3
              )
              with self.assertRaises(KeyError):
                  metrics = evaluator.evaluate(
                      sess, ensemble_metrics=metrics
                  )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  from adanet import tf_compat
  from adanet.core.evaluator import Evaluator
  import adanet.core.testing_utils
  import numpy
  import tensorflow.compat.v2
  from tensorflow.python.eager import context
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 5 for calling the EvaluatorTest obj's underlying member method code with example usage: obj.test_evaluate_invalid_metric() without return types