code: def test_metric_ops_not_duplicated_on_cpu(self):
      with context.graph_mode():
          self.setup_graph()
          metric_fn = lambda: {
              "metric": (tf.constant(5), tf.constant(5))
          }
          best_candidate_index = 3
          mode = tf.estimator.ModeKeys.EVAL
          ensemble_metrics = tu.create_ensemble_metrics(metric_fn)
          subnetwork_metrics = tu.create_subnetwork_metrics(metric_fn)
          iteration_metrics = tu.create_iteration_metrics(
              ensemble_metrics=[ensemble_metrics],
              subnetwork_metrics=[subnetwork_metrics],
          )
  
          ensemble_ops1 = ensemble_metrics.eval_metrics_ops()
          ensemble_ops2 = ensemble_metrics.eval_metrics_ops()
          subnetwork_ops1 = subnetwork_metrics.eval_metrics_ops()
          subnetwork_ops2 = subnetwork_metrics.eval_metrics_ops()
          iteration_ops1 = iteration_metrics.best_eval_metric_ops(
              best_candidate_index, mode
          )
          iteration_ops2 = iteration_metrics.best_eval_metric_ops(
              best_candidate_index, mode
          )
  
          self.assertEqual(subnetwork_ops1, subnetwork_ops2)
          self.assertEqual(ensemble_ops1, ensemble_ops2)
          self.assertEqual(iteration_ops1, iteration_ops2)
          for ops in [ensemble_ops1, subnetwork_ops1, iteration_ops1]:
              self.assertIsNotNone(ops)
  
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.architecture import _Architecture
  from adanet.core.eval_metrics import _call_eval_metrics
  import adanet.core.testing_utils
  import tensorflow.compat.v2
  from tensorflow.python.eager import context
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 10 for calling the MetricsTest obj's underlying member method code with example usage: obj.test_metric_ops_not_duplicated_on_cpu() without return types