code: def create_sample_pipeline(
      m: metadata.Metadata,
      pipeline_id: str,
      run_num: int,
      export_ir_path: str = "",
      external_ir_file: str = "",
      deployment_config: Optional[message.Message] = None,
      execute_nodes_func: Callable[
          [metadata.Metadata, pipeline_pb2.Pipeline, int], None
      ] = _execute_nodes,
  ):
      """Creates a list of pipeline and node execution."""
      ir_path = _get_ir_path(external_ir_file)
      for i in range(run_num):
          run_id = "run%02d" % i
          pipeline = _test_pipeline(
              ir_path, pipeline_id, run_id, deployment_config
          )
          if export_ir_path:
              output_path = os.path.join(
                  export_ir_path, "%s_%s.pbtxt" % (pipeline_id, run_id)
              )
              io_utils.write_pbtxt_file(output_path, pipeline)
          pipeline_state = pipeline_ops.initiate_pipeline_start(
              m, pipeline
          )
          if not external_ir_file:
              execute_nodes_func(m, pipeline, i)
          if i < run_num - 1:
              with pipeline_state:
                  pipeline_state.set_pipeline_execution_state(
                      metadata_store_pb2.Execution.COMPLETE
                  )
  
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 5 for calling a global function with example usage: create_sample_pipeline(m, pipeline_id, run_num, export_ir_path, external_ir_file, deployment_config, execute_nodes_func) without return types