code: def clear_dead_threads(self):
          
          for tid in self.get_thread_ids():
              aThread = self.get_thread(tid)
              if not aThread.is_alive():
                  self._del_thread(aThread)
docs: Remove Thread objects from the snapshot
          referring to threads no longer running.