code: def collect_output(self, out_file=None):
          
          if self.logger.isEnabledFor(logging.INFO):
              self.logger.info(
                  "collecting output %s", " to %s" % out_file if out_file else ''
              )
              self.logger.info("self.output %s", self.output)
          return collect_output(self.output, out_file)
docs: Run :func:`collect_output` on the job's output directory.