code: def show_qouts(self, nids=None, stream=sys.stdout):
          
          lines = []
  
          for task in self.iflat_tasks(status=self.S_QCRITICAL, nids=nids):
              header = "=== " + task.qout_file.path + "==="
              lines.append(header)
              if task.qout_file.exists:
                  with open(task.qout_file.path, "rt") as fh:
                      lines += fh.readlines()
              else:
                  lines.append("File does not exist!")
  
              lines.append("=" * len(header) + 2*"\n")
  
          return stream.writelines(lines)
docs: Write to the given stream the content of the queue output file for all tasks whose status is S_QCRITICAL.
  
          Args:
              nids: optional list of node identifiers used to filter the tasks.
              stream: File-like object. Default: sys.stdout