code: def fold_text_stream(self, prefix, postfix="", hidden_stream=None, **kwargs):
          
          import io
          if hidden_stream is None:
              hidden_stream = sys.stdout
          assert isinstance(hidden_stream, io.IOBase)
          assert hidden_stream is sys.stdout, "currently not supported otherwise"
          hidden_buf = io.StringIO()
          with self._temp_replace_attrib(sys, "stdout", hidden_buf):
              yield
          self.fold_text(prefix=prefix, postfix=postfix, hidden=hidden_buf.getvalue(), **kwargs)
docs: :param str prefix: always visible
          :param str postfix: always visible, right after.
          :param io.TextIOBase|io.StringIO hidden_stream: sys.stdout by default.
              If this is sys.stdout, it will replace that stream,
              and collect the data during the context (in the `with` block).