def get_pipeline(cls, pipeline_name: Text) -> PassPipeline:
        """
        Gets a pipeline based on the name. Raises an error if no pipeline is found.
        Available Pipelines are defined in _PIPELINE_NAME_TO_PASSES
        """
        if pipeline_name not in cls._PIPELINE_NAME_TO_PASSES:
            raise ValueError(
                f"There is no pipeline for `{pipeline_name}`. "
                f"Available pipelines: {cls._PIPELINE_NAME_TO_PASSES.keys()}"
            )
        # We need to copy the pass names when initialize a PassPipeline object,
        # to prevent the member functions of PassPipeline from potentially modifying the original
        # data in _PIPELINE_NAME_TO_PASSES.
        passes = list(cls._PIPELINE_NAME_TO_PASSES[pipeline_name])
        return PassPipeline(passes, pipeline_name)

        Gets a pipeline based on the name. Raises an error if no pipeline is found.
        Available Pipelines are defined in _PIPELINE_NAME_TO_PASSES
        
coremltools/converters/mil/mil/passes/pass_pipeline.py