code: def testRunStatisticsGen(self):
      # Prepare the paths
      test_data_dir = os.path.join(
          os.path.dirname(os.path.dirname(__file__)),
          "components",
          "testdata",
      )
      output_data_dir = os.path.join(
          os.environ.get(
              "TEST_UNDECLARED_OUTPUTS_DIR", tempfile.mkdtemp()
          ),
          self._testMethodName,
      )
      statistics_split_names_path = os.path.join(
          output_data_dir, "statistics.properties", "split_names"
      )
      fileio.makedirs(output_data_dir)
  
      # Run StatisticsGen
      run_component.run_component(
          full_component_class_name="tfx.components.StatisticsGen",
          examples_uri=os.path.join(test_data_dir, "csv_example_gen"),
          examples_split_names=artifact_utils.encode_split_names(
              ["train", "eval"]
          ),
          # Testing that we can set non-string artifact properties
          examples_version="1",
          statistics_path=output_data_dir,
          statistics_split_names_path=statistics_split_names_path,
      )
  
      # Check the statistics_gen outputs
      self.assertTrue(
          fileio.exists(
              os.path.join(
                  output_data_dir, "Split-train", "FeatureStats.pb"
              )
          )
      )
      self.assertTrue(
          fileio.exists(
              os.path.join(
                  output_data_dir, "Split-eval", "FeatureStats.pb"
              )
          )
      )
      self.assertTrue(os.path.exists(statistics_split_names_path))
      self.assertEqual(
          pathlib.Path(statistics_split_names_path).read_text(),
          '["train", "eval"]',
      )
  
file_path: tfx/tfx/scripts/run_component_test.py
imports: import os
  import pathlib
  import tempfile
  from absl.testing import absltest
  import tensorflow
  from tfx.dsl.io import fileio
  from tfx.scripts import run_component
  from tfx.types import artifact_utils
label_desc: Use image node_id 1 for calling the RunComponentTest obj's underlying member method code with example usage: obj.testRunStatisticsGen() without return types