code: def test_ventilator_stop(self):
      size = 100
      max_ventilation_queue_size = 10
  
      pool = DummyPool()
  
      ventilator = ConcurrentVentilator(
          ventilate_fn=pool.ventilate,
          items_to_ventilate=[{"item": i} for i in range(size)],
          max_ventilation_queue_size=max_ventilation_queue_size,
      )
      pool.start(IdentityWorker, ventilator=ventilator)
  
      [pool.get_results() for _ in range(max_ventilation_queue_size)]
  
      # Stop the ventilator queue after some time, so there should only be 10 items left on it
      while (
          ventilator._ventilated_items_count
          - ventilator._processed_items_count
          < max_ventilation_queue_size
      ):
          time.sleep(0.1)
  
      ventilator.stop()
  
      [pool.get_results() for _ in range(max_ventilation_queue_size)]
      with self.assertRaises(EmptyResultError):
          pool.get_results()
  
      pool.stop()
      pool.join()
  
imports: import time
  import unittest
  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 IdentityWorker
  from petastorm.workers_pool.thread_pool import ThreadPool
  from petastorm.workers_pool.ventilator import ConcurrentVentilator
label_desc: Use image node_id 10 for calling the TestWorkersPool obj's underlying member method code with example usage: obj.test_ventilator_stop() without return types