Context manager for temporarily redirecting stderr to another file.
contextlib/redirect_stderr
redirect_stderr