code: def testPipeline(self):
      self._copyTemplate("taxi")
  
      # Uncomment all variables in config.
      self._uncommentMultiLineVariables(
          os.path.join("pipeline", "configs.py"),
          [
              "GOOGLE_CLOUD_REGION",
              "BIG_QUERY_WITH_DIRECT_RUNNER_BEAM_PIPELINE_ARGS",
              "BIG_QUERY_QUERY",
              "DATAFLOW_BEAM_PIPELINE_ARGS",
              "GCP_AI_PLATFORM_TRAINING_ARGS",
              "GCP_AI_PLATFORM_SERVING_ARGS",
          ],
      )
      self._replaceFileContent(
          os.path.join("pipeline", "configs.py"),
          [
              (
                  "GOOGLE_CLOUD_REGION = ''",
                  "GOOGLE_CLOUD_REGION = '{}'".format(self._GCP_REGION),
              ),
          ],
      )
  
      # Prepare data
      self._prepare_data()
      self._replaceFileContent(
          "kubeflow_runner.py",
          [
              (
                  "DATA_PATH = 'gs://{}/tfx-template/data/taxi/'.format(configs.GCS_BUCKET_NAME)",
                  "DATA_PATH = 'gs://{{}}/{}/{}'.format(configs.GCS_BUCKET_NAME)".format(
                      self._DATA_DIRECTORY_NAME, self._pipeline_name
                  ),
              ),
          ],
      )
  
      self._compile_pipeline()
      self._check_telemetry_label()
  
      # Create a pipeline with only one component.
      self._create_pipeline()
      self._run_pipeline()
  
      # Update the pipeline to include all components.
      updated_pipeline_file = self._addAllComponents()
      logging.info(
          "Updated %s to add all components to the pipeline.",
          updated_pipeline_file,
      )
      self._update_pipeline()
      self._run_pipeline()
  
      # Enable BigQuery
      self._uncomment(
          os.path.join("pipeline", "pipeline.py"),
          [
              "query: str,",
              "example_gen = tfx.extensions.google_cloud_big_query.BigQueryExampleGen(",
              "    query=query)",
          ],
      )
      self._uncomment(
          "kubeflow_runner.py",
          [
              "query=configs.BIG_QUERY_QUERY",
              "beam_pipeline_args=configs\n",
              ".BIG_QUERY_WITH_DIRECT_RUNNER_BEAM_PIPELINE_ARGS,",
          ],
      )
      logging.info("Added BigQueryExampleGen to pipeline.")
      self._update_pipeline()
      self._run_pipeline()
  
      # TODO(b/173065862) Re-enable Dataflow tests after timeout is resolved.
      #     # Enable Dataflow
      #     self._comment('kubeflow_runner.py', [
      #         'beam_pipeline_args=configs\n',
      #         '.BIG_QUERY_WITH_DIRECT_RUNNER_BEAM_PIPELINE_ARGS',
      #     ])
      #     self._uncomment('kubeflow_runner.py', [
      #         'beam_pipeline_args=configs.DATAFLOW_BEAM_PIPELINE_ARGS',
      #     ])
      #     logging.info('Added Dataflow to pipeline.')
      #     self._update_pipeline()
      #     self._run_pipeline()
  
      #     # Enable CAIP extension.
      #     self._comment('kubeflow_runner.py', [
      #         'beam_pipeline_args=configs.DATAFLOW_BEAM_PIPELINE_ARGS',
      #     ])
      self._uncomment(
          "kubeflow_runner.py",
          [
              "ai_platform_training_args=configs.GCP_AI_PLATFORM_TRAINING_ARGS,",
              "ai_platform_serving_args=configs.GCP_AI_PLATFORM_SERVING_ARGS,",
          ],
      )
      logging.info("Using CAIP trainer and pusher.")
      self._update_pipeline()
      self._run_pipeline()
  
file_path: tfx/tfx/experimental/templates/taxi/e2e_tests/kubeflow_e2e_test.py
imports: import os
  from absl import logging
  import tensorflow
  from tfx.experimental.templates import container_based_test_case
  from tfx.orchestration.kubeflow import test_utils
label_desc: Use image node_id 4 for calling the TaxiTemplateKubeflowE2ETest obj's underlying member method code with example usage: obj.testPipeline() without return types