class_docstr: Patches KubeflowV2DagRunner.run() with several customizations for CLI.
docstr: Initialize KubeflowV2DagRunnerPatcher.
  
  Args:
    call_real_run: Specify KubeflowV2DagRunner.run() should be called.
    build_image_fn: If specified, the function will be called before run()
      with the configured tfx_image in the pipeline. The result of the
      function will be substituted as a new tfx_image of the pipeline.
    prepare_dir_fn: If specified, this function will be called with
      pipeline_name as an argument. Before the run() is called.
      The result of the function will be used as a directory to store the
      pipeline.
code: def __init__(
      self,
      call_real_run: bool,
      build_image_fn: Optional[Callable[[str], str]] = None,
      prepare_dir_fn: Optional[Callable[[str], str]] = None,
  ):
      """Initialize KubeflowV2DagRunnerPatcher.
  
      Args:
        call_real_run: Specify KubeflowV2DagRunner.run() should be called.
        build_image_fn: If specified, the function will be called before run()
          with the configured tfx_image in the pipeline. The result of the
          function will be substituted as a new tfx_image of the pipeline.
        prepare_dir_fn: If specified, this function will be called with
          pipeline_name as an argument. Before the run() is called.
          The result of the function will be used as a directory to store the
          pipeline.
      """
      super().__init__(call_real_run)
      self._build_image_fn = build_image_fn
      self._prepare_dir_fn = prepare_dir_fn
  
file_path: tfx/tfx/tools/cli/handler/kubeflow_v2_dag_runner_patcher.py
imports: import os
  import typing
  from typing import Any, Callable, MutableMapping, Optional, Type
  from tfx.orchestration import pipeline
  from tfx.orchestration import tfx_runner
  from tfx.orchestration.kubeflow.v2 import kubeflow_v2_dag_runner
  from tfx.tools.cli.handler import dag_runner_patcher
label_desc: Use image node_id 1 to create a new KubeflowV2DagRunnerPatcher object from inherited base classes: dag_runner_patcher with example: obj = KubeflowV2DagRunnerPatcher(call_real_run, build_image_fn, prepare_dir_fn)