docstr: Resetting ventilator after all items were ventilated will make it re-ventilate the same items
docstr_tok: ["Resetting","ventilator","after","all","items","were","ventilated","will","make","it","re-ventilate","the","same","items"]
code: def test_reset_ventilator(self):
      """Resetting ventilator after all items were ventilated will make it re-ventilate the same items"""
      items_count = 100
      for pool in [DummyPool(), ThreadPool(10)]:
          ventilator = ConcurrentVentilator(
              ventilate_fn=pool.ventilate,
              items_to_ventilate=[
                  {"item": i} for i in range(items_count)
              ],
              iterations=1,
          )
          pool.start(IdentityWorker, ventilator=ventilator)
  
          # Readout all ventilated items
          for _ in range(items_count):
              pool.get_results()
  
          # Should fail reading the next, as all items were read by now
          with self.assertRaises(EmptyResultError):
              pool.get_results()
  
          # Resetting, hence will be read out the items all over again
          ventilator.reset()
  
          for _ in range(items_count):
              pool.get_results()
  
          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 7 for calling the TestWorkersPool obj's underlying member method code with example usage: obj.test_reset_ventilator() without return types