code: def testMeanExampleCountIsZero(self):
      example = {
          "labels": None,
          "predictions": None,
          "features": {
              "example_weights": [0.0],
              "age": [18],
          },
      }
  
      feature_key_path = ["features", "age"]
      example_weights_key_path = ["features", "example_weights"]
  
      mean_metric_computation = stats.Mean(
          feature_key_path,
          example_weights_key_path=example_weights_key_path,
      ).computations()[0]
      key = mean_metric_computation.keys[0]
  
      with beam.Pipeline() as pipeline:
          result = (
              pipeline
              | "Create" >> beam.Create([example])
              | "Process"
              >> beam.Map(metric_util.to_standard_metric_inputs)
              | "AddSlice" >> beam.Map(lambda x: ((), x))
              | "ComputeMeanMetric"
              >> beam.CombinePerKey(mean_metric_computation.combiner)
          )
  
          def check_result(got):
              try:
                  self.assertLen(got, 1)
                  got_slice_key, got_metrics = got[0]
                  self.assertEqual(got_slice_key, ())
                  self.assertLen(got_metrics, 1)
                  self.assertIn(key, got_metrics)
                  self.assertTrue(np.isnan(got_metrics[key]))
  
              except AssertionError as err:
                  raise util.BeamAssertException(err)
  
          util.assert_that(result, check_result, label="result")
  
imports: from absl.testing import parameterized
  import apache_beam
  from apache_beam.testing import util
  import numpy
  import tensorflow
  import tensorflow_model_analysis
  from tensorflow_model_analysis.eval_saved_model import testutil
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.metrics import metric_util
  from tensorflow_model_analysis.metrics import stats
  from google.protobuf import text_format
label_desc: Use image node_id 3 for calling the MeanTestInvalidExamples obj's underlying member method code with example usage: obj.testMeanExampleCountIsZero() without return types