def METHOD_NAME(self):
    """Redirects standard out and error to own functions"""
    if sys.stdout:
        self.original_stdout_write = sys.stdout.write
        sys.stdout.write = self._my_stdout_write
        self._std_available = True
    if sys.stderr:
        self.original_stderr_write = sys.stderr.write
        sys.stderr.write = self._my_stderr_write
        self._std_available = True