def build_joblist(jobgraph):
    """Returns a list of jobs, from a passed jobgraph."""
    jobset = set()
    for job in jobgraph:
        jobset = populate_jobset(job, jobset, depth=1)
    return list(jobset)