class_docstr: Responsible for launching a stub executor.
  
  A stub component launcher class inheriting BaseStubComponentLauncher can be
  supported by the pipeline. This class should be defined in a separate python
  module because the class is pickled by module path in beam and imported by
  module path in KFP.
  The executor will be launched in the same process of the rest of the
  component, i.e. its driver and publisher.
docstr: Initializes variables in the stub launcher class.
  
  For beam pipeline, stub launcher class inheriting this class is defined in
  tfx.experimental.pipeline_testing.stub_component_launcher.py
  
  For KFP, stub launcher class inheriting this class is defined in
  tfx.experimental.templates.taxi.launcher.stub_component_launcher.py.
  
  These classes then can be used to launch stub executors in the pipeline.
  
  For example,
  
  stub_component_launcher.StubComponentLauncher.initialize(
      test_data_dir,
      test_component_ids = ['Trainer', 'Transform'])
  PipelineConfig(
      supported_launcher_classes=[
          stub_component_launcher.StubComponentLauncher
      ],
  )
  
  The method initializes the necessary class variables for the
  BaseStubComponentLauncher class, including test_component_ids.
  
  Args:
    test_data_dir: The directory where pipeline outputs are recorded
      (pipeline_recorder.py).
    test_component_ids: List of ids of components that are to be tested. In
      other words, executors of components other than those specified by this
      list will be replaced with a BaseStubExecutor.
  
  Returns:
    None
code: def initialize(
      cls, test_data_dir: str, test_component_ids: List[str]
  ):
      """Initializes variables in the stub launcher class.
  
      For beam pipeline, stub launcher class inheriting this class is defined in
      tfx.experimental.pipeline_testing.stub_component_launcher.py
  
      For KFP, stub launcher class inheriting this class is defined in
      tfx.experimental.templates.taxi.launcher.stub_component_launcher.py.
  
      These classes then can be used to launch stub executors in the pipeline.
  
      For example,
  
      stub_component_launcher.StubComponentLauncher.initialize(
          test_data_dir,
          test_component_ids = ['Trainer', 'Transform'])
      PipelineConfig(
          supported_launcher_classes=[
              stub_component_launcher.StubComponentLauncher
          ],
      )
  
      The method initializes the necessary class variables for the
      BaseStubComponentLauncher class, including test_component_ids.
  
      Args:
        test_data_dir: The directory where pipeline outputs are recorded
          (pipeline_recorder.py).
        test_component_ids: List of ids of components that are to be tested. In
          other words, executors of components other than those specified by this
          list will be replaced with a BaseStubExecutor.
  
      Returns:
        None
      """
      cls.test_component_ids = test_component_ids
      cls.test_data_dir = test_data_dir
  
file_path: tfx/tfx/experimental/pipeline_testing/base_stub_component_launcher.py
imports: import os
  from typing import Any, Dict, List
  from tfx import types
  from tfx.dsl.components.base import base_executor
  from tfx.experimental.pipeline_testing import base_stub_executor
  from tfx.orchestration.launcher import in_process_component_launcher
label_desc: Use image node_id 1 for calling the BaseStubComponentLauncher obj's underlying member method code with example usage: obj.initialize(cls, test_data_dir, test_component_ids) without return types