code: def _create_pipeline(
      pipeline_name: str,
      pipeline_root: str,
      data_root: str,
      metadata_path: str,
  ) -> pipeline.Pipeline:
      """Implements the chicago taxi pipeline with TFX."""
  
      # Brings data into the pipeline or otherwise joins/converts training data.
      example_gen = CsvExampleGen(input_base=data_root)
  
      # Computes statistics over data for visualization and example validation.
      statistics_gen = StatisticsGen(
          examples=example_gen.outputs["examples"]
      )
  
      # Generates schema based on statistics files.
      infer_schema = SchemaGen(
          statistics=statistics_gen.outputs["statistics"]
      )
  
      # Performs anomaly detection based on statistics and data schema.
      validate_stats = ExampleValidator(
          statistics=statistics_gen.outputs["statistics"],
          schema=infer_schema.outputs["schema"],
      )
  
      return pipeline.Pipeline(
          pipeline_name=pipeline_name,
          pipeline_root=pipeline_root,
          components=[
              example_gen,
              statistics_gen,
              infer_schema,
              validate_stats,
          ],
          enable_cache=True,
          metadata_connection_config=metadata.sqlite_metadata_connection_config(
              metadata_path
          ),
          additional_pipeline_args={},
      )
  
file_path: tfx/tfx/tools/cli/testdata/test_pipeline_local_3.py
imports: import os
  import absl
  from tfx.components.example_gen.csv_example_gen.component import CsvExampleGen
  from tfx.components.example_validator.component import ExampleValidator
  from tfx.components.schema_gen.component import SchemaGen
  from tfx.components.statistics_gen.component import StatisticsGen
  from tfx.orchestration import metadata
  from tfx.orchestration import pipeline
  from tfx.orchestration.local import local_dag_runner
label_desc: Use image node_id 1 for calling a global function with example usage: _create_pipeline(pipeline_name, pipeline_root, data_root, metadata_path) and returns: pipeline