def METHOD_NAME(
        pipeline_funcs,
        function_name,
        output_path,
        type_check,
        mode: Optional[dsl.PipelineExecutionMode] = None,
        pipeline_conf: Optional[dsl.PipelineConf] = None):
    if len(pipeline_funcs) == 0:
        raise ValueError(
            'A function with @dsl.pipeline decorator is required in the py file.'
        )
    if len(pipeline_funcs) > 1 and not function_name:
        func_names = [x.__name__ for x in pipeline_funcs]
        raise ValueError(
            'There are multiple pipelines: %s. Please specify --function.' %
            func_names)
    if function_name:
        pipeline_func = next(
            (x for x in pipeline_funcs if x.__name__ == function_name), None)
        if not pipeline_func:
            raise ValueError('The function "%s" does not exist. '
                             'Did you forget @dsl.pipeline decoration?' %
                             function_name)
    else:
        pipeline_func = pipeline_funcs[0]
    kfp.deprecated.compiler.Compiler(mode=mode).compile(pipeline_func,
                                                        output_path, type_check,
                                                        pipeline_conf)