code: def _worker(executor_reference, work_queue):
      try:
          while True:
              work_item = work_queue.get(block=True)
              if work_item is not None:
                  work_item.run()
                  # Delete references to object. See issue16284
                  del work_item
                  continue
              executor = executor_reference()
              # Exit if:
              #   - The interpreter is shutting down OR
              #   - The executor that owns the worker has been collected OR
              #   - The executor that owns the worker has been shutdown.
              if _shutdown or executor is None or executor._shutdown:
                  # Notice other workers
                  work_queue.put(None)
                  return
              del executor
      except BaseException:
          _base.LOGGER.critical("Exception in worker", exc_info=True)
  
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 2 for calling a global function with example usage: _worker(executor_reference, work_queue) without return types