code: def is_dumb_terminal(term: str | None = None) -> bool:
      """
      True if this terminal type is considered "dumb".
  
      If so, we should fall back to the simplest possible form of line editing,
      without cursor positioning and color support.
      """
      if term is None:
          return is_dumb_terminal(os.environ.get("TERM", ""))
  
      return term.lower() in ["dumb", "unknown"]
  
imports: from __future__ import annotations
  import os
  import signal
  import sys
  import threading
  from collections import deque
  from typing import Callable, ContextManager, Dict, Generator, Generic, TypeVar, Union
  from wcwidth import wcwidth
label_desc: Use image node_id 13 for calling a global function with example usage: is_dumb_terminal(term) and returns: unknown, is_dumb_terminal