code: def warning_filter():
      with warnings.catch_warnings():
          env_py_warnings = os.environ.get("PYTHONWARNINGS", "")
          for warning_category in [
              RuntimeWarning,
              UserWarning,
              ConvergenceWarning,
              ValueWarning,
              FutureWarning,
          ]:
              warnings.simplefilter("ignore", category=warning_category)
          try:
              os.environ["PYTHONWARNINGS"] = "ignore"
              yield
          finally:
              os.environ["PYTHONWARNINGS"] = env_py_warnings
  
file_path: autogluon/timeseries/src/autogluon/timeseries/utils/warning_filters.py
imports: import contextlib
  import functools
  import io
  import logging
  import os
  import sys
  import warnings
  from statsmodels.tools.sm_exceptions import ConvergenceWarning, ValueWarning
label_desc: Use image node_id 1 for calling a global function with example usage: warning_filter() without return types