class_docstr: BeamExecutorOperator handles Beam based executor's init and execution.
  
  Attributes:
    extra_flags: Extra flags that will pass to Beam executors. It come from
      two sources in the order:
      1. The `extra_flags` set in the executor spec.
      2. The flags passed in when starting the program by users or by other
         systems. The interpretation of these flags relying on the executor
         implementation.
    beam_pipeline_args: Beam specific arguments that will pass to Beam
      executors. It comes from `beam_pipeline_args` set in the Beam executor
      spec.
class_docstr_tok: ["BeamExecutorOperator","handles","Beam","based","executor","'s","init","and","execution",".","Attributes",":","extra_flags",":","Extra","flags","that","will","pass","to","Beam","executors",".","It","come","from","two","sources","in","the","order",":","1",".","The","`","extra_flags","`","set","in","the","executor","spec",".","2",".","The","flags","passed","in","when","starting","the","program","by","users","or","by","other","systems",".","The","interpretation","of","these","flags","relying","on","the","executor","implementation",".","beam_pipeline_args",":","Beam","specific","arguments","that","will","pass","to","Beam","executors",".","It","comes","from","`","beam_pipeline_args","`","set","in","the","Beam","executor","spec","."]
docstr: Invokes executors given input from the Launcher.
  
  Args:
    execution_info: A wrapper of the details of this execution.
    make_beam_pipeline_fn: A custom method to create a Beam Pipeline object.
  
  Returns:
    The output from executor.
docstr_tok: ["Invokes","executors","given","input","from","the","Launcher",".","Args",":","execution_info",":","A","wrapper","of","the","details","of","this","execution",".","make_beam_pipeline_fn",":","A","custom","method","to","create","a","Beam","Pipeline","object",".","Returns",":","The","output","from","executor","."]
code: def run_executor(
      self,
      execution_info: data_types.ExecutionInfo,
      make_beam_pipeline_fn: Optional[
          Callable[[], _BeamPipeline]
      ] = None,
  ) -> execution_result_pb2.ExecutorOutput:
      """Invokes executors given input from the Launcher.
  
      Args:
        execution_info: A wrapper of the details of this execution.
        make_beam_pipeline_fn: A custom method to create a Beam Pipeline object.
  
      Returns:
        The output from executor.
      """
      context = placeholder_utils.ResolutionContext(
          exec_info=execution_info,
          executor_spec=self._executor_spec,
          platform_config=self._platform_config,
      )
  
      self.beam_pipeline_args = [
          placeholder_utils.resolve_placeholder_expression(
              beam_pipeline_arg, context
          )
          for beam_pipeline_arg in self.beam_pipeline_args
      ]
  
      context = base_beam_executor.BaseBeamExecutor.Context(
          beam_pipeline_args=self.beam_pipeline_args,
          extra_flags=self.extra_flags,
          tmp_dir=execution_info.tmp_dir,
          unique_id=str(execution_info.execution_id),
          executor_output_uri=execution_info.execution_output_uri,
          stateful_working_dir=execution_info.stateful_working_dir,
          pipeline_node=execution_info.pipeline_node,
          pipeline_info=execution_info.pipeline_info,
          pipeline_run_id=execution_info.pipeline_run_id,
          make_beam_pipeline_fn=make_beam_pipeline_fn,
      )
      executor = self._executor_cls(context=context)
      return python_executor_operator.run_with_executor(
          execution_info, executor
      )
  
file_path: tfx/tfx/orchestration/portable/beam_executor_operator.py
imports: from typing import Any, Callable, Optional, cast
  from tfx.dsl.compiler import placeholder_utils
  from tfx.dsl.components.base import base_beam_executor
  from tfx.orchestration.portable import base_executor_operator
  from tfx.orchestration.portable import data_types
  from tfx.orchestration.portable import python_executor_operator
  from tfx.proto.orchestration import executable_spec_pb2
  from tfx.proto.orchestration import execution_result_pb2
  from tfx.utils import import_utils
  from google.protobuf import message
label_desc: Use image node_id 2 for calling the BeamExecutorOperator obj's underlying member method code with example usage: obj.run_executor(execution_info, make_beam_pipeline_fn) and returns: python_executor_operator