class_docstr: Writer allowing redirection of streams to logger methods.
class_docstr_tok: ["Writer","allowing","redirection","of","streams","to","logger","methods","."]
code: def flush(self):
      if self._msg != "":
          self._writer(self._msg)
          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 3 for calling the LoggerWriter obj's underlying member method code with example usage: obj.flush() without return types