code: def traverseJobGraph(self, rootJob, jobsToReport=None, foundJobStoreIDs=None):
          
          if jobsToReport is None:
              jobsToReport = []
  
          if foundJobStoreIDs is None:
              foundJobStoreIDs = set()
  
          if rootJob.jobStoreID in foundJobStoreIDs:
              return jobsToReport
  
          foundJobStoreIDs.add(rootJob.jobStoreID)
          jobsToReport.append(rootJob)
          # Traverse jobs in stack
          for jobs in rootJob.stack:
              for successorJobStoreID in [x.jobStoreID for x in jobs]:
                  if successorJobStoreID not in foundJobStoreIDs and self.jobStore.exists(successorJobStoreID):
                      self.traverseJobGraph(self.jobStore.load(successorJobStoreID), jobsToReport, foundJobStoreIDs)
  
          # Traverse service jobs
          for jobs in rootJob.services:
              for serviceJobStoreID in [x.jobStoreID for x in jobs]:
                  if self.jobStore.exists(serviceJobStoreID):
                      if serviceJobStoreID in foundJobStoreIDs:
                          raise RuntimeError('Service job was unexpectedly found while traversing ')
                      foundJobStoreIDs.add(serviceJobStoreID)
                      jobsToReport.append(self.jobStore.load(serviceJobStoreID))
  
          return jobsToReport
docs: Find all current jobs in the jobStore and return them as an Array.
  
          :param jobNode rootJob: The root job of the workflow.
          :param list jobsToReport: A list of jobNodes to be added to and returned.
          :param set foundJobStoreIDs: A set of jobStoreIDs used to keep track of jobStoreIDs encountered in traversal.
          :returns jobsToReport: The list of jobs currently in the job graph.