docs: def flush_stdout(self):
          """
          Empties the standard out redirect buffer and renders the
          contents to the body as a preformatted text box.
          """
          try:
              contents = self.stdout_interceptor.flush_all()
          except Exception:
              return
  
          if len(contents) > 0:
              self.body.append(render_texts.preformatted_text(contents))
              self._last_update_time = time.time()
  
          return contents