def create_pipeline(path_to_yml_files, script_name, num_jobs=1, num_gpus=0,
    run_in='host', blocking=False, prefix='-p', extra_cmd_args=''):
    """
    Takes a list of yml files, a script name, and some configuration options and
    creates a pipeline that can be passed to :py:mod:`scripts.pipeline` so that each
    job is executed accordingly.

    Args:
        path_to_yml_files (list): List of paths to each .yml file that contains the 
            generated experiment configuration from the sweep.
        script_name (str): What script to use, should exist in :py:mod:`scripts`.
        num_jobs (int, optional): Number of jobs to be used to run each of these jobs. 
            Is used as the max_workers argument in 
            :py:class:`runners.script_runner_pool.ScriptRunnerPool`. Defaults to 1.
        num_gpus (int, optional): Number of GPUs to use for each job. Defaults to 0.
        run_in (str, optional): Whether to run on 'host' or 'container'. 
            Defaults to 'host'.
        blocking (bool, optional): Whether to block on each job (forces the jobs to run
            sequentially). Defaults to False.
        prefix (str, optional): The prefix to use before the command (either '-p' or '-y').
            Defaults to '-p'.
        extra_cmd_args (str, optional): Any extra command line arguments that pipeline may
            need to run the script, specified as a str as if it was on the command line. 
            Defaults to ''.
    
    Returns:
        dict: A dictionary containing the sequence of pipelines that is later dumped to
            YAML so it can be passed to :py:mod:`scripts.pipeline`.
    """
    pipeline = {
        'jobs': [],
        'num_jobs': num_jobs
    }
    for p in path_to_yml_files:
        _job = {
            'script': script_name,
            'config': f"""{prefix} "{p}" {extra_cmd_args}""",
            'run_in': run_in,
            'blocking': blocking,
            'num_gpus': num_gpus,
        }
        pipeline['jobs'].append(_job)
    return pipeline