code: def testNativeEvalSavedModelMetricComputations(self):
      temp_export_dir = self._getExportDir()
      _, export_dir = linear_classifier.simple_linear_classifier(
          None, temp_export_dir
      )
  
      eval_shared_model = self.createTestEvalSharedModel(
          eval_saved_model_path=export_dir
      )
  
      computation = eval_saved_model_util.metric_computations_using_eval_saved_model(
          "", eval_shared_model.model_loader
      )[
          0
      ]
  
      examples = [
          self._makeExample(age=3.0, language="english", label=1.0),
          self._makeExample(age=3.0, language="chinese", label=0.0),
          self._makeExample(age=4.0, language="english", label=1.0),
          self._makeExample(age=5.0, language="chinese", label=0.0),
      ]
  
      extracts = []
      for e in examples:
          extracts.append({constants.INPUT_KEY: e.SerializeToString()})
  
      with beam.Pipeline() as pipeline:
          # pylint: disable=no-value-for-parameter
          result = (
              pipeline
              | "Create" >> beam.Create(extracts)
              | "Process" >> beam.ParDo(computation.preprocessors[0])
              | "ToStandardMetricInputs"
              >> beam.Map(metric_types.StandardMetricInputs)
              | "AddSlice" >> beam.Map(lambda x: ((), x))
              | "ComputeMetric"
              >> beam.CombinePerKey(computation.combiner)
          )
  
          # pylint: enable=no-value-for-parameter
  
          def check_result(got):
              try:
                  self.assertLen(got, 1)
                  got_slice_key, got_metrics = got[0]
                  self.assertEqual(got_slice_key, ())
                  self.assertDictElementsAlmostEqual(
                      got_metrics,
                      {
                          metric_types.MetricKey(
                              name="accuracy", example_weighted=None
                          ): 1.0,
                          metric_types.MetricKey(
                              name="label/mean", example_weighted=None
                          ): 0.5,
                          metric_types.MetricKey(
                              name="my_mean_age", example_weighted=None
                          ): 3.75,
                          metric_types.MetricKey(
                              name="my_mean_age_times_label",
                              example_weighted=None,
                          ): 1.75,
                      },
                  )
  
              except AssertionError as err:
                  raise util.BeamAssertException(err)
  
          util.assert_that(result, check_result, label="result")
  
file_path: model-analysis/tensorflow_model_analysis/evaluators/eval_saved_model_util_test.py
imports: import os
  import apache_beam
  from apache_beam.testing import util
  import tensorflow
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.eval_saved_model import testutil
  from tensorflow_model_analysis.eval_saved_model.example_trainers import linear_classifier
  from tensorflow_model_analysis.eval_saved_model.example_trainers import multi_head
  from tensorflow_model_analysis.evaluators import eval_saved_model_util
  from tensorflow_model_analysis.metrics import metric_types
label_desc: Use image node_id 2 for calling the EvalSavedModelUtilTest obj's underlying member method code with example usage: obj.testNativeEvalSavedModelMetricComputations() without return types