code: def create_test_pipeline():
      upstream_component = UpstreamComponent()
      my_component = MyComponent(
          mandatory=upstream_component.outputs["first_model"],
          optional_but_needed=upstream_component.outputs[
              "second_model"
          ],
          optional_and_not_needed=upstream_component.outputs[
              "third_model"
          ],
      )
      return pipeline.Pipeline(
          pipeline_name=_pipeline_name,
          pipeline_root=_pipeline_root,
          components=[upstream_component, my_component],
      )
  
imports: import os
  from typing import Any, Dict, List, Optional
  from tfx import types
  from tfx.dsl.components.base import base_component
  from tfx.dsl.components.base import base_executor
  from tfx.dsl.components.base import executor_spec
  from tfx.orchestration import pipeline
  from tfx.types import component_spec
  from tfx.types import standard_artifacts
label_desc: Use image node_id 1 for calling a global function with example usage: create_test_pipeline() and returns: pipeline