code: def create_pipeline() -> pipeline_pb2.Pipeline:
      """Creates a pipeline with a resolver node for testing."""
      trainer = _trainer().with_id(
          "my_trainer"
      )  # pylint: disable=no-value-for-parameter
      rnode = resolver.Resolver(
          strategy_class=latest_artifact_strategy.LatestArtifactStrategy,
          config={"desired_num_of_artifacts": 1},
          resolved_model=types.Channel(
              type=standard_artifacts.Model,
              producer_component_id=trainer.id,
              output_key="model",
          ),
      ).with_id("my_resolver")
      rnode.add_upstream_node(trainer)
      consumer = _consumer(
          resolved_model=rnode.outputs["resolved_model"]
      ).with_id("my_consumer")
      pipeline = pipeline_lib.Pipeline(
          pipeline_name="my_pipeline",
          pipeline_root="/path/to/root",
          components=[
              trainer,
              rnode,
              consumer,
          ],
          execution_mode=pipeline_lib.ExecutionMode.SYNC,
      )
      dsl_compiler = compiler.Compiler()
      return dsl_compiler.compile(pipeline)
  
file_path: tfx/tfx/orchestration/experimental/core/testing/test_pipeline_with_resolver.py
imports: from tfx import types
  from tfx.dsl.compiler import compiler
  from tfx.dsl.component.experimental.annotations import InputArtifact
  from tfx.dsl.component.experimental.annotations import OutputArtifact
  from tfx.dsl.component.experimental.decorators import component
  from tfx.dsl.components.common import resolver
  from tfx.dsl.input_resolution.strategies import latest_artifact_strategy
  from tfx.orchestration import pipeline
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.types import standard_artifacts
label_desc: Use image node_id 3 for calling a global function with example usage: create_pipeline() and returns: dsl_compiler