class_docstr: Writer allowing redirection of streams to logger methods.
class_docstr_tok: ["Writer","allowing","redirection","of","streams","to","logger","methods","."]
code: def __init__(self, writer: Callable):
      self._writer = writer
      self._msg = ""
  
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 1 to create a new LoggerWriter object  with example: obj = LoggerWriter(writer)