code: def is_kernel_mode():
      try:
          return bool(_internal_mode.kernel)
      except AttributeError:
          _internal_mode.kernel = None
          return False
  
file_path: mars/mars/core/mode.py
imports: import functools
  import inspect
  import threading
  from ..config import options
label_desc: Use image node_id 2 for calling a global function with example usage: is_kernel_mode() and returns: bool, False