code: def test_tfdv_telemetry(self):
      record_batches = [
          pa.RecordBatch.from_arrays(
              [
                  pa.array([[1.0, 2.0]]),
                  pa.array([["a", "b", "c", "e"]]),
                  pa.array([None]),
              ],
              ["a", "b", "c"],
          ),
          pa.RecordBatch.from_arrays(
              [
                  pa.array([[3.0, 4.0, np.NaN, 5.0]]),
                  pa.array([["d", "e", "f"]]),
                  pa.array([None]),
              ],
              ["a", "b", "c"],
          ),
          pa.RecordBatch.from_arrays(
              [
                  pa.array([None]),
                  pa.array([["a", "b", "c"]]),
                  pa.array([[10, 20, 30]]),
              ],
              ["a", "b", "c"],
          ),
          pa.RecordBatch.from_arrays(
              [
                  pa.array([[5.0]]),
                  pa.array([["d", "e", "f"]]),
                  pa.array([[1]]),
              ],
              ["a", "b", "c"],
          ),
      ]
  
      expected_num_bytes = sum(rb.nbytes for rb in record_batches)
  
      p = beam.Pipeline()
      _ = (
          p
          | "CreateBatches"
          >> beam.Create(record_batches, reshuffle=False)
          | "GenerateStatsImpl" >> stats_impl.GenerateStatisticsImpl()
      )
  
      runner = p.run()
      runner.wait_until_finish()
      result_metrics = runner.metrics()
  
      # TODO(b/125474748): Add all the counters.
      expected_result = {
          "num_instances": 4,
          "num_int_feature_values": 2,
          "int_feature_values_min_count": 1,
          "int_feature_values_max_count": 3,
          "int_feature_values_mean_count": 2,
          "num_float_feature_values": 3,
          "float_feature_values_min_count": 1,
          "float_feature_values_max_count": 4,
          "float_feature_values_mean_count": 2,
          "num_string_feature_values": 4,
          "string_feature_values_min_count": 3,
          "string_feature_values_max_count": 4,
          "string_feature_values_mean_count": 3,
          "record_batch_input_bytes": expected_num_bytes,
      }
  
      # Check each counter.
      for counter_name in expected_result:
          actual_counter = result_metrics.query(
              beam.metrics.metric.MetricsFilter().with_name(
                  counter_name
              )
          )["counters"]
          self.assertLen(actual_counter, 1)
          self.assertEqual(
              actual_counter[0].committed, expected_result[counter_name]
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import copy
  import sys
  from typing import Iterable
  import unittest
  from absl.testing import absltest
  from absl.testing import parameterized
  import apache_beam
  from apache_beam.testing import util
  import numpy
  import pyarrow
  from tensorflow_data_validation.statistics import stats_impl
  from tensorflow_data_validation.statistics import stats_options
  from tensorflow_data_validation.statistics.generators import cross_feature_stats_generator
  from tensorflow_data_validation.statistics.generators import stats_generator
  from tensorflow_data_validation.utils import slicing_util
  from tensorflow_data_validation.utils import test_util
  from tfx_bsl.arrow import array_util
  from tfx_bsl.arrow import table_util
  from tfx_bsl.public.proto import slicing_spec_pb2
  from tfx_bsl.statistics import merge_util
  from google.protobuf import text_format
  from tensorflow.python.util.protobuf import compare
  from tensorflow_metadata.proto.v0 import schema_pb2
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 14 for calling the StatsImplTest obj's underlying member method code with example usage: obj.test_tfdv_telemetry() without return types