code: def testMean(self, distribution):
      def _dataset_fn():
          return (
              dataset_ops.Dataset.range(1000)
              .map(math_ops.to_float)
              .batch(4, drop_remainder=True)
          )
  
      def _expected_fn(num_batches):
          # Mean(0..3) = 1.5, Mean(0..7) = 3.5, Mean(0..11) = 5.5, etc.
          return num_batches * 2 - 0.5
  
      self._test_metric(
          distribution, _dataset_fn, metrics.mean, _expected_fn
      )
  
imports: from absl.testing import parameterized
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.distribute import combinations
  from tensorflow.python.distribute import strategy_combinations
  from tensorflow.python.distribute import strategy_test_lib
  from tensorflow.python.eager import test
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import metrics
  from tensorflow.python.ops import variables
label_desc: Use image node_id 2 for calling the MetricsV1Test obj's underlying member method code with example usage: obj.testMean(distribution) and returns: dataset_ops, unknown