class_docstr: Manages the communication between this process and the worker processes.
  
  The manager is run in a local thread.
  
  Args:
      executor: A reference to the ProcessPoolExecutor that owns
          this thread. A weakref will be own by the manager as well as
          references to internal objects used to introspect the state of
          the executor.
class_docstr_tok: ["Manages","the","communication","between","this","process","and","the","worker","processes",".","The","manager","is","run","in","a","local","thread",".","Args",":","executor",":","A","reference","to","the","ProcessPoolExecutor","that","owns","this","thread",".","A","weakref","will","be","own","by","the","manager","as","well","as","references","to","internal","objects","used","to","introspect","the","state","of","the","executor","."]
code: def wait_result_broken_or_wakeup(self):
      # Wait for a result to be ready in the result_queue while checking
      # that all worker processes are still running, or for a wake up
      # signal send. The wake up signals come either from new tasks being
      # submitted, from the executor being shutdown/gc-ed, or from the
      # shutdown of the python interpreter.
      result_reader = self.result_queue._reader
      assert not self.thread_wakeup._closed
      wakeup_reader = self.thread_wakeup._reader
      readers = [result_reader, wakeup_reader]
      worker_sentinels = [
          p.sentinel for p in list(self.processes.values())
      ]
      ready = mp.connection.wait(readers + worker_sentinels)
  
      cause = None
      is_broken = True
      result_item = None
      if result_reader in ready:
          try:
              result_item = result_reader.recv()
              is_broken = False
          except BaseException as e:
              cause = format_exception(type(e), e, e.__traceback__)
  
      elif wakeup_reader in ready:
          is_broken = False
  
      # No need to hold the _shutdown_lock here because:
      # 1. we're the only thread to use the wakeup reader
      # 2. we're also the only thread to call thread_wakeup.close()
      # 3. we want to avoid a possible deadlock when both reader and writer
      #    would block (gh-105829)
      self.thread_wakeup.clear()
  
      return result_item, is_broken, cause
  
imports: import os
  from concurrent.futures import _base
  import queue
  import multiprocessing
  import multiprocessing.connection
  from multiprocessing.queues import Queue
  import threading
  import weakref
  from functools import partial
  import itertools
  import sys
  from traceback import format_exception
label_desc: Use image node_id 4 for calling the _ExecutorManagerThread obj's underlying member method code with example usage: obj.wait_result_broken_or_wakeup() and returns: result_item,  is_broken,  cause