code: def _python_exit():
      global _shutdown
      _shutdown = True
      items = list(_threads_queues.items())
      for t, q in items:
          q.put(None)
      for t, q in items:
          t.join()
  
file_path: distributed/distributed/_concurrent_futures_thread.py
imports: from __future__ import annotations
  import atexit
  import itertools
  import os
  import queue
  import threading
  import weakref
  from concurrent.futures import _base
label_desc: Use image node_id 1 for calling a global function with example usage: _python_exit() without return types