code: def _filtering_mode() -> str:
      mode = config.traceback_filtering.value
      if mode is None or mode == "auto":
          if (
              _running_under_ipython()
              and _ipython_supports_tracebackhide()
          ):
              mode = "tracebackhide"
          else:
              mode = "quiet_remove_frames"
      return mode
  
imports: from __future__ import annotations
  import functools
  import os
  import sys
  import traceback
  import types
  from typing import Any, Callable, TypeVar, cast
  from jax._src import config
  from jax._src import util
  from jax._src.lib import xla_extension
label_desc: Use image node_id 13 for calling a global function with example usage: _filtering_mode() and returns: mode