code: def cleanTempDirs(job):
      
      if job is CWLJob and job._succeeded:  # Only CWLJobs have this attribute.
          for tempDir in job.openTempDirs:
              if os.path.exists(tempDir):
                  shutil.rmtree(tempDir)
          job.openTempDirs = []
docs: Remove temporarly created directories.