def getTopologicalOrderingOfJobs(self):
        ordering = []
        visited = set()
        def getRunOrder(job):
            #Do not add the job to the ordering until all its predecessors have been
            #added to the ordering
            for p in job._directPredecessors:
                if p not in visited:
                    return
            if job not in visited:
                visited.add(job)
                ordering.append(job)
                map(getRunOrder, job._children + job._followOns)
        getRunOrder(self)
        return ordering
:returns: a list of jobs such that for all pairs of indices i, j for which i < j,         the job at index i can be run before the job at index j.
dataset/ETHPy150Open BD2KGenomics/toil/src/toil/job.py/Job.getTopologicalOrderingOfJobs