code: def is_running_in_console() -> bool:
      """
      Check if the code is running in console or not.
  
      Returns:
          bool: True if running in console else False
      """
  
      return sys.stdout.isatty()
  
imports: import sys
  from dotenv import load_dotenv
  from .path import find_closest
label_desc: Use image node_id 2 for calling a global function with example usage: is_running_in_console() and returns: sys