code: def _dfs(self, visited):
          
          if self not in visited:
              visited.add(self)
              for successor in self._children + self._followOns:
                  successor._dfs(visited)
docs: Adds the job and all jobs reachable on a directed path from current node to the given set.