def METHOD_NAME(self):
    if self.buffer:
        if self._stderr_buffer is None:
            self._stderr_buffer = io.StringIO()
            self._stdout_buffer = io.StringIO()
        sys.stdout = self._stdout_buffer
        sys.stderr = self._stderr_buffer