code: def create_test_pipeline():
      """Builds a consumer pipeline that requires artifacts from producer pipelines."""
      producer_pipeline = create_producer_pipeline()
  
      pipeline_inputs = pipeline.PipelineInputs(
          {"examples": producer_pipeline.outputs["examples"]}
      )
  
      example_gen_resolver = resolver.Resolver(
          strategy_class=latest_artifact_strategy.LatestArtifactStrategy,
          examples=pipeline_inputs["examples"],
      ).with_id("Resolver.example_gen_resolver")
  
      statistics_gen = StatisticsGen(
          examples=example_gen_resolver.outputs["examples"]
      )
  
      return pipeline.Pipeline(
          inputs=pipeline_inputs,
          pipeline_name="consumer-pipeline",
          components=[example_gen_resolver, statistics_gen],
      )
  
file_path: tfx/tfx/dsl/compiler/testdata/consumer_pipeline.py
imports: import os
  from tfx.components import CsvExampleGen
  from tfx.components import StatisticsGen
  from tfx.dsl.components.common import resolver
  from tfx.dsl.input_resolution.strategies import latest_artifact_strategy
  from tfx.orchestration import pipeline
label_desc: Use image node_id 2 for calling a global function with example usage: create_test_pipeline() and returns: pipeline