code: def _GetTestBeamComponentPipeline(
      self, num_workers_env_var_name, direct_running_mode_env_var_name
  ) -> pipeline_py.Pipeline:
      # Construct component instances.
      dummy_beam_component = SimpleBeamPoweredComponent().with_id(
          "Beam"
      )
  
      # Construct and run pipeline
      temp_path = tempfile.mkdtemp()
      pipeline_root_path = os.path.join(temp_path, "pipeline_root")
      metadata_path = os.path.join(temp_path, "metadata.db")
      return pipeline_py.Pipeline(
          pipeline_name="test_pipeline",
          pipeline_root=pipeline_root_path,
          metadata_connection_config=sqlite_metadata_connection_config(
              metadata_path
          ),
          components=[dummy_beam_component],
          beam_pipeline_args=[
              "--runner=DirectRunner",
              "--direct_running_mode="
              + ph.environment_variable(
                  direct_running_mode_env_var_name
              ),
              ph.environment_variable(num_workers_env_var_name),
          ],
      )
  
file_path: tfx/tfx/orchestration/local/local_pipeline_beam_test.py
imports: import os
  import tempfile
  import absl.testing.absltest
  import apache_beam
  from apache_beam.options import pipeline_options
  from tfx.dsl.component.experimental import annotations
  from tfx.dsl.component.experimental.decorators import component
  from tfx.dsl.placeholder import placeholder
  from tfx.orchestration import pipeline
  from tfx.orchestration.local import local_dag_runner
  from tfx.orchestration.metadata import sqlite_metadata_connection_config
label_desc: Use image node_id 2 for calling the LocalDagRunnerTest obj's underlying member method code with example usage: obj._GetTestBeamComponentPipeline(num_workers_env_var_name, direct_running_mode_env_var_name) and returns: pipeline_py