def sort_parts(wf):
    """Sort jobs and job uses to make test deterministic"""
    for job in wf["jobs"]:
        job["uses"].sort(key=lambda u: u["lfn"])

    wf["jobs"].sort(key=lambda j: j["id"])

    return wf