def __enter__(self):
        self.original_stdout = sys.stdout
        self.original_stderr = sys.stderr
        self.out = StringIO()
        self.err = StringIO()
        sys.stdout = self.out
        sys.stderr = self.err
        return self.out, self.err