code: def test_exception_reusing_thread_pool(self):
      WORKERS_COUNT = 10
      pool = ThreadPool(WORKERS_COUNT)
      pool.start(WorkerIdGeneratingWorker)
      with self.assertRaises(EmptyResultError):
          pool.get_results()
      pool.ventilate()
      self.assertIsNotNone(pool.get_results())
      with self.assertRaises(EmptyResultError):
          pool.get_results()
      pool.stop()
      pool.join()
      with self.assertRaises(RuntimeError) as e:
          pool.start(WorkerIdGeneratingWorker)
      self.assertTrue(
          "ThreadPool({}) cannot be reused! stop_event set? {}".format(
              WORKERS_COUNT, True
          )
          in str(e.exception)
      )
  
imports: import time
  import unittest
  import numpy
  from multiprocessing import Process, Manager
  from psutil import pid_exists
  from petastorm.workers_pool import EmptyResultError
  from petastorm.workers_pool.dummy_pool import DummyPool
  from petastorm.workers_pool.process_pool import ProcessPool
  from petastorm.workers_pool.tests.stub_workers import CoeffMultiplierWorker, WorkerIdGeneratingWorker, WorkerMultiIdGeneratingWorker, SleepyWorkerIdGeneratingWorker, ExceptionGeneratingWorker_5, PreprogrammedReturnValueWorker
  from petastorm.workers_pool.thread_pool import ThreadPool
label_desc: Use image node_id 21 for calling the TestWorkersPool obj's underlying member method code with example usage: obj.test_exception_reusing_thread_pool() without return types