code: def _update_statuses(self, sub_job_num=None):
          
          # initialize status dictionary
          status_dict = dict()
  
          for val in CONDOR_JOB_STATUSES.values():
              status_dict[val] = 0
  
          for node in self.node_set:
              job = node.job
              try:
                  job_status = job.status
                  status_dict[job_status] += 1
              except (KeyError, HTCondorError):
                  status_dict['Unexpanded'] += 1
  
          return status_dict
docs: Update statuses of jobs nodes in workflow.