code: def tqdm_logging():
      """Overrides logging to go through TQDM.
  
      https://github.com/tqdm/tqdm#redirecting-writing
  
      """
      handler = logging.get_absl_handler()
      orig = handler.python_handler
  
      try:
          handler._python_handler = logging.PythonHandler(
              stream=TqdmFile(sys.stderr)
          )
  
          # The changes won't take effect if this hasn't been called. Defensively
          # call it again here.
          logging.use_python_logging()
          yield orig.stream
      except Exception as exc:
          raise exc
      finally:
          handler._python_handler = orig
  
file_path: caliban/caliban/util/tqdm.py
imports: import contextlib
  import sys
  from absl import logging
  from blessings import Terminal
  import tqdm
  from tqdm.utils import _term_move_up
label_desc: Use image node_id 2 for calling a global function with example usage: tqdm_logging() without return types