code: def _getAllJobStates(workflowDir):
          
          jobStateFiles = []
          for root, dirs, files in os.walk(workflowDir):
              for filename in files:
                  if filename == '.jobState':
                      jobStateFiles.append(os.path.join(root, filename))
          for filename in jobStateFiles:
              try:
                  yield NonCachingFileStore._readJobState(filename)
              except IOError as e:
                  if e.errno == 2:
                      # job finished & deleted its jobState file since the jobState files were discovered
                      continue
                  else:
                      raise
docs: Generator function that deserializes and yields the job state for every job on the node,
          one at a time.
  
          :param str workflowDir: The location of the workflow directory on the node.
          :return: dict with keys (jobName,  jobPID, jobDir, deferredFunctions)
          :rtype: dict