code: def testDo(self):
      output_data_dir = os.path.join(
          os.environ.get(
              "TEST_UNDECLARED_OUTPUTS_DIR", self.create_tempdir()
          ),
          self._testMethodName,
      )
  
      # Create output dict.
      examples = standard_artifacts.Examples()
      examples.uri = output_data_dir
      output_dict = {standard_component_specs.EXAMPLES_KEY: [examples]}
  
      # Create exec proterties.
      exec_properties = {
          standard_component_specs.INPUT_BASE_KEY: self._input_data_dir,
          standard_component_specs.INPUT_CONFIG_KEY: proto_utils.proto_to_json(
              example_gen_pb2.Input(
                  splits=[
                      example_gen_pb2.Input.Split(
                          name="csv", pattern="csv/*"
                      ),
                  ]
              )
          ),
          standard_component_specs.OUTPUT_CONFIG_KEY: proto_utils.proto_to_json(
              example_gen_pb2.Output(
                  split_config=example_gen_pb2.SplitConfig(
                      splits=[
                          example_gen_pb2.SplitConfig.Split(
                              name="train", hash_buckets=2
                          ),
                          example_gen_pb2.SplitConfig.Split(
                              name="eval", hash_buckets=1
                          ),
                      ]
                  )
              )
          ),
      }
  
      # Run executor.
      csv_example_gen = executor.Executor()
      csv_example_gen.Do({}, output_dict, exec_properties)
  
      self.assertEqual(
          artifact_utils.encode_split_names(["train", "eval"]),
          examples.split_names,
      )
  
      # Check CSV example gen outputs.
      train_output_file = os.path.join(
          examples.uri, "Split-train", "data_tfrecord-00000-of-00001.gz"
      )
      eval_output_file = os.path.join(
          examples.uri, "Split-eval", "data_tfrecord-00000-of-00001.gz"
      )
      self.assertTrue(fileio.exists(train_output_file))
      self.assertTrue(fileio.exists(eval_output_file))
      self.assertGreater(
          fileio.open(train_output_file).size(),
          fileio.open(eval_output_file).size(),
      )
  
file_path: tfx/tfx/components/example_gen/csv_example_gen/executor_test.py
imports: import os
  from absl.testing import absltest
  import apache_beam
  from apache_beam.testing import util
  from tfx.components.example_gen.csv_example_gen import executor
  from tfx.dsl.io import fileio
  from tfx.proto import example_gen_pb2
  from tfx.types import artifact_utils
  from tfx.types import standard_artifacts
  from tfx.types import standard_component_specs
  from tfx.utils import proto_utils
label_desc: Use image node_id 5 for calling the ExecutorTest obj's underlying member method code with example usage: obj.testDo() without return types