code: def testWriteSplitCounter_WithTFRECORDS_GZIP(self):
      count = 10
      exec_properties = {
          standard_component_specs.OUTPUT_DATA_FORMAT_KEY: example_gen_pb2.PayloadFormat.FORMAT_TF_EXAMPLE
      }
  
      def Pipeline(root):
          data = [tf.train.Example()] * count
          _ = (
              root
              | beam.Create(data)
              | write_split.WriteSplit(
                  self._output_data_dir,
                  example_gen_pb2.FORMAT_TFRECORDS_GZIP,
                  exec_properties,
              )
          )
  
      run_result = direct_runner.DirectRunner().run(Pipeline)
      run_result.wait_until_finish()
  
      num_instances = run_result.metrics().query(
          MetricsFilter().with_name("num_instances")
      )
  
      self.assertTrue(
          fileio.exists(
              os.path.join(
                  self._output_data_dir,
                  "data_tfrecord-00000-of-00001.gz",
              )
          )
      )
      self.assertTrue(num_instances["counters"])
      self.assertEqual(len(num_instances["counters"]), 1)
      self.assertEqual(num_instances["counters"][0].result, count)
  
file_path: tfx/tfx/components/example_gen/write_split_test.py
imports: import os
  import apache_beam
  from apache_beam.metrics.metric import MetricsFilter
  from apache_beam.runners.direct import direct_runner
  import pyarrow
  import tensorflow
  from tfx.components.example_gen import write_split
  from tfx.dsl.io import fileio
  from tfx.proto import example_gen_pb2
  from tfx.types import standard_component_specs
label_desc: Use image node_id 3 for calling the WriteSplitTest obj's underlying member method code with example usage: obj.testWriteSplitCounter_WithTFRECORDS_GZIP() without return types