code: def SimpleBeamPoweredComponent(
      beam_pipeline: annotations.BeamComponentParameter[
          beam.Pipeline
      ] = None,
  ):
      with beam_pipeline as p:
          direct_num_workers = p.options.view_as(
              pipeline_options.DirectOptions
          ).direct_num_workers
          direct_running_mode = p.options.view_as(
              pipeline_options.DirectOptions
          ).direct_running_mode
          LocalDagRunnerTest.BEAM_ARG_VALUES[
              "direct_num_workers"
          ] = direct_num_workers
          LocalDagRunnerTest.BEAM_ARG_VALUES[
              "direct_running_mode"
          ] = direct_running_mode
  
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 1 for calling a global function with example usage: SimpleBeamPoweredComponent(beam_pipeline) without return types