code: def create_test_pipeline():
      """Create a test pipeline with resolver function."""
  
      example_gen = CsvExampleGen(input_base="/data/mydummy_dataset")
  
      trainer_inputs = resolve_trainer_inputs(
          {
              "examples": example_gen.outputs["examples"],
          },
          n=1,
      )
  
      trainer = Trainer(
          module_file="/src/train.py",
          examples=trainer_inputs["examples"],
          train_args=trainer_pb2.TrainArgs(num_steps=2000),
      )
  
      return pipeline.Pipeline(
          pipeline_name="resolver-function",
          pipeline_root="/tmp",
          components=[example_gen, trainer],
      )
  
file_path: tfx/tfx/dsl/compiler/testdata/resolver_function_pipeline.py
imports: from typing import Sequence
  from tfx.components import CsvExampleGen
  from tfx.components import Trainer
  from tfx.dsl.input_resolution import resolver_function
  from tfx.dsl.input_resolution import resolver_op
  from tfx.orchestration import pipeline
  from tfx.proto import trainer_pb2
  import tfx.types
  from tfx.utils import typing_utils
label_desc: Use image node_id 2 for calling a global function with example usage: create_test_pipeline() and returns: pipeline