code: def in_ipython_shell(shell_name: Optional[str] = None) -> bool:
      """Return whether we are in a terminal running IPython"""
      if not shell_name:
          shell_name = _get_ipython_shell_name()
      return shell_name == "TerminalInteractiveShell"
  
file_path: ray/python/ray/widgets/util.py
imports: import importlib
  import logging
  import sys
  import textwrap
  from functools import wraps
  from typing import Any, Callable, Iterable, Optional, TypeVar, Union
  from packaging.version import Version
  from ray._private.thirdparty.tabulate.tabulate import tabulate
  from ray.util.annotations import DeveloperAPI
  from ray.widgets import Template
label_desc: Use image node_id 8 for calling a global function with example usage: in_ipython_shell(shell_name) and returns: unknown