code: def _test_pipeline(
      ir_path: str,
      pipeline_id: str,
      run_id: str,
      deployment_config: Optional[message.Message],
  ):
      """Creates test pipeline with pipeline_id and run_id."""
      pipeline = pipeline_pb2.Pipeline()
      io_utils.parse_pbtxt_file(ir_path, pipeline)
      pipeline.pipeline_info.id = pipeline_id
      runtime_parameter_utils.substitute_runtime_parameter(
          pipeline,
          {
              constants.PIPELINE_RUN_ID_PARAMETER_NAME: run_id,
          },
      )
      if deployment_config:
          pipeline.deployment_config.Pack(deployment_config)
      return pipeline
  
imports: import os
  import tempfile
  from typing import Optional, Callable
  from absl import app
  from absl import flags
  from tfx.dsl.compiler import constants
  from tfx.orchestration import metadata
  from tfx.orchestration.experimental.core import pipeline_ops
  from tfx.orchestration.experimental.core import pipeline_state
  from tfx.orchestration.experimental.core import task
  from tfx.orchestration.experimental.core import test_utils
  from tfx.orchestration.experimental.core.testing import test_sync_pipeline
  from tfx.orchestration.portable import runtime_parameter_utils
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.utils import io_utils
  from tfx.utils import status
  from google.protobuf import message
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 2 for calling a global function with example usage: _test_pipeline(ir_path, pipeline_id, run_id, deployment_config) and returns: pipeline