def preselect_parents(job):
    for parent in self.depending[job]:
        if (parent in preselect):
            continue
        preselect.add(parent)
        preselect_parents(parent)
def preselect_parents(job):
    for parent in self.depending[job]:
        if (parent in preselect):
            continue
        preselect.add(parent)
        preselect_parents(parent)