class_docstr: Context manager to redirect stdout and stderr to logger.
class_docstr_tok: ["Context","manager","to","redirect","stdout","and","stderr","to","logger","."]
code: def __exit__(self, *args, **kwargs):
      if self.c_redirect:
          self.c_redirect.__exit__(*args, **kwargs)
      self.redirect_stderr.__exit__(*args, **kwargs)
      self.redirect_stdout.__exit__(*args, **kwargs)
  
imports: import logging
  import os
  import traceback
  import warnings
  from contextlib import redirect_stderr, redirect_stdout
  from typing import Callable, Optional, Union
label_desc: Use image node_id 3 for calling the redirect_output obj's underlying member method code with example usage: obj.__exit__() without return types