code: def _running_under_ipython() -> bool:
      """Returns true if we appear to be in an IPython session."""
      try:
          get_ipython()  # type: ignore
          return True
      except NameError:
          return False
  
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 11 for calling a global function with example usage: _running_under_ipython() and returns: True, False