code: def clean_jobs(self, link, job_dict=None, clean_all=False):
          
          failed = False
          if job_dict is None:
              job_dict = link.jobs
  
          for job_details in job_dict.values():
              # clean failed jobs
              if job_details.status == JobStatus.failed or clean_all:
                  # clean_job(job_details.logfile, job_details.outfiles, self._dry_run)
                  clean_job(job_details.logfile, {}, self._dry_run)
                  job_details.status = JobStatus.ready
          if failed:
              return JobStatus.failed
          return JobStatus.done
docs: Clean up all the jobs associated with this link.
  
          Returns a `JobStatus` enum