code: def in_main_thread() -> bool:
      """
      True when the current thread is the main thread.
      """
      return (
          threading.current_thread().__class__.__name__ == "_MainThread"
      )
  
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 6 for calling a global function with example usage: in_main_thread() and returns: unknown