code: def _add_stream_handler():
      # Add stream_handler to AG logger if it doesn't already exist
      # This is necessary so that the modification of logging level can take effect
      # Also this adjust the logging format
      # This function is supposed to be called before any logging from autogluon happens
      if not any(
          isinstance(h, logging.StreamHandler)
          for h in _logger_ag.handlers
      ):
          stream_handler = logging.StreamHandler()
          formatter = logging.Formatter("%(message)s")
          stream_handler.setFormatter(formatter)
          _logger_ag.addHandler(stream_handler)
          _logger_ag.propagate = False
  
file_path: autogluon/common/src/autogluon/common/utils/log_utils.py
imports: import logging
  from typing import Optional
label_desc: Use image node_id 5 for calling a global function with example usage: _add_stream_handler() without return types