class_docstr: This class allows to capture writes to sys.stdout|stderr "in-memory"
  and will raise errors on tries to read from sys.stdin. It only
  modifies sys.stdout|stderr|stdin attributes and does not
  touch underlying File Descriptors (use StdCaptureFD for that).
docstr: return (outfile, errfile) and stop capturing. 
docstr_tok: ["return","(","outfile",",","errfile",")","and","stop","capturing","."]
code: def done(self, save=True):
      """return (outfile, errfile) and stop capturing."""
      outfile = errfile = None
      if self.out and not self.out.closed:
          sys.stdout = self._oldout
          outfile = self.out
          outfile.seek(0)
      if self.err and not self.err.closed:
          sys.stderr = self._olderr
          errfile = self.err
          errfile.seek(0)
      if self.in_:
          sys.stdin = self._oldin
      return outfile, errfile
  
imports: import os
  import sys
  import py
  import tempfile
label_desc: Use image node_id 3 for calling the StdCapture obj's underlying member method code with example usage: obj.done(save) and returns: outfile,  errfile