code: def fix_logging_if_kaggle():
      """
      Fixes logger in Kaggle. In Kaggle logging is redirected to a file which hides all AutoGluon log output from the notebook.
      This function checks if we are in a Kaggle notebook, and if so adds a StreamHandler to AutoGluon's logger to ensure logs are shown.
      """
      global __FIXED_KAGGLE_LOGGING
      if (not __FIXED_KAGGLE_LOGGING) and _check_if_kaggle():
          _add_stream_handler()
      # After the fix is performed, or it is determined we are not in Kaggle, no need to fix again.
      __FIXED_KAGGLE_LOGGING = True
  
file_path: autogluon/common/src/autogluon/common/utils/log_utils.py
imports: import logging
  from typing import Optional
label_desc: Use image node_id 6 for calling a global function with example usage: fix_logging_if_kaggle() without return types