code: def get_status(self):
          
          if self.n_total == 0:
              return JobStatus.no_job
          elif self.n_done == self.n_total:
              return JobStatus.done
          elif self.n_failed > 0:
              # If more that a quater of the jobs fail, fail the whole thing
              if self.n_failed > self.n_total / 4.:
                  return JobStatus.failed
              return JobStatus.partial_failed
          elif self.n_running > 0:
              return JobStatus.running
          elif self.n_pending > 0:
              return JobStatus.pending
          return JobStatus.ready
docs: Return an overall status based
          on the number of jobs in various states.