def _rename_jobs(jobs, deps, new_job_name):
    """Renames jobs (in a jobs list dependencies dict) according to the
    new_job_name dict mapping."""
    for job in jobs:
        job["id"] = new_job_name[job["id"]]
    
    new_deps = {}
    for (src,dst) in deps.items():
        new_deps[new_job_name[src]] = [new_job_name[x] for x in dst]
    
    return jobs, new_deps