code: def patch_stdout_context(self, raw=False, patch_stdout=True, patch_stderr=True):
          
          return _PatchStdoutContext(
              self.stdout_proxy(raw=raw),
              patch_stdout=patch_stdout, patch_stderr=patch_stderr)
docs: Return a context manager that will replace ``sys.stdout`` with a proxy
          that makes sure that all printed text will appear above the prompt, and
          that it doesn't destroy the output from the renderer.
  
          :param patch_stdout: Replace `sys.stdout`.
          :param patch_stderr: Replace `sys.stderr`.