code: def test_ensemble_metrics(self):
      with context.graph_mode():
          self.setup_graph()
          architecture = _Architecture(
              "test_ensemble_candidate", "test_ensembler"
          )
          architecture.add_subnetwork(
              iteration_number=0, builder_name="b_0_0"
          )
          architecture.add_subnetwork(
              iteration_number=0, builder_name="b_0_1"
          )
          architecture.add_subnetwork(
              iteration_number=1, builder_name="b_1_0"
          )
          architecture.add_subnetwork(
              iteration_number=2, builder_name="b_2_0"
          )
  
          metrics = tu.create_ensemble_metrics(
              self._metric_fn,
              features=self._features,
              labels=self._labels,
              estimator_spec=self._estimator_spec,
              architecture=architecture,
          )
  
          actual = self._run_metrics(metrics.eval_metrics_tuple())
  
          serialized_arch_proto = actual[
              "architecture/adanet/ensembles"
          ]
          expected_arch_string = b"| b_0_0 | b_0_1 | b_1_0 | b_2_0 |"
          self.assertIn(expected_arch_string, serialized_arch_proto)
  
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 8 for calling the MetricsTest obj's underlying member method code with example usage: obj.test_ensemble_metrics() without return types