def _ready(self, job):
    'Return whether the given job is ready to execute.'
    group = self._group.get(job, None)
    if (group is None):
        is_external_needrun_dep = self.needrun
    else:

        def is_external_needrun_dep(j):
            g = self._group.get(j, None)
            return (self.needrun(j) and ((g is None) or (g != group)))
    return self._finished.issuperset(filter(is_external_needrun_dep, self.dependencies[job]))
Return whether the given job is ready to execute.
def _ready(self, job):
    
    group = self._group.get(job, None)
    if (group is None):
        is_external_needrun_dep = self.needrun
    else:

        def is_external_needrun_dep(j):
            g = self._group.get(j, None)
            return (self.needrun(j) and ((g is None) or (g != group)))
    return self._finished.issuperset(filter(is_external_needrun_dep, self.dependencies[job]))