code: def get_pipeline_definition(pipeline_name, working_dir):
      
      logger.debug("starting")
  
      pipeline_path = get_pipeline_path(
          pipeline_name=pipeline_name,
          working_directory=working_dir)
  
      logger.debug(f"Trying to open pipeline at path {pipeline_path}")
      try:
          with open(pipeline_path) as yaml_file:
              pipeline_definition = pypyr.yaml.get_pipeline_yaml(
                  yaml_file)
              logger.debug(
                  f"found {len(pipeline_definition)} stages in pipeline.")
      except FileNotFoundError:
          logger.error(
              "The pipeline doesn't exist. Looking for a file here: "
              f"{pipeline_name}.yaml in the /pipelines sub directory.")
          raise
  
      logger.debug("pipeline definition loaded")
  
      logger.debug("done")
      return pipeline_definition
docs: Open and parse the pipeline definition yaml.
  
      Parses pipeline yaml and returns dictionary representing the pipeline.
  
      pipeline_name.yaml should be in the working_dir/pipelines/ directory.
  
      Args:
          pipeline_name: string. Name of pipeline. This will be the file-name of
                         the pipeline - i.e {pipeline_name}.yaml
          working_dir: path. Start looking in
                             ./working_dir/pipelines/pipeline_name.yaml
  
      Returns:
          dict describing the pipeline, parsed from the pipeline yaml.
  
      Raises:
          FileNotFoundError: pipeline_name.yaml not found in the various pipeline
                             dirs.