code: def rejoin():
      """Have this thread rejoin the ThreadPoolExecutor
  
      This will block until a new slot opens up in the executor.  The next thread
      to finish a task will leave the pool to allow this one to join.
  
      See Also
      --------
      secede : leave the thread pool
      """
      thread = threading.current_thread()
      event = threading.Event()
      e = thread_state.executor
      with e._rejoin_lock:
          e._rejoin_list.append((thread, event))
      e.submit(lambda: None)
      event.wait()
      thread_state.proceed = True
  
file_path: distributed/distributed/threadpoolexecutor.py
imports: from __future__ import annotations
  import itertools
  import logging
  import os
  import queue
  import threading
  from distributed import _concurrent_futures_thread
  from distributed.metrics import time
label_desc: Use image node_id 3 for calling a global function with example usage: rejoin() without return types