class_docstr: A ConcurrentVentilator handles ventilation of a pre-determined list of items to a worker pool and performs
  the ventilation concurrently in a separate thread. It will keep track of how many items are currently in the
  ventilation queue and prevent it from monotonically increasing in order to prevent boundless memory requirements.
  It allows for multiple (or infinite) iterations of ventilating the items, optionally randomizing the order of
  items being ventilated at the start of each iteration.
class_docstr_tok: ["A","ConcurrentVentilator","handles","ventilation","of","a","pre-determined","list","of","items","to","a","worker","pool","and","performs","the","ventilation","concurrently","in","a","separate","thread",".","It","will","keep","track","of","how","many","items","are","currently","in","the","ventilation","queue","and","prevent","it","from","monotonically","increasing","in","order","to","prevent","boundless","memory","requirements",".","It","allows","for","multiple","(","or","infinite",")","iterations","of","ventilating","the","items",",","optionally","randomizing","the","order","of","items","being","ventilated","at","the","start","of","each","iteration","."]
code: def _ventilate(self):
      while True:
          # Stop condition is when no iterations are remaining or there are no items to ventilate
          if self.completed():
              break
  
          # If we are ventilating the first item, we check if we would like to randomize the item order
          if (
              self._current_item_to_ventilate == 0
              and self._randomize_item_order
          ):
              self._random_state.shuffle(self._items_to_ventilate)
  
          # Block until queue has room, but use continue to allow for checking if stop has been called
          if (
              self._ventilated_items_count - self._processed_items_count
              >= self._max_ventilation_queue_size
          ):
              sleep(self._ventilation_interval)
              continue
  
          item_to_ventilate = self._items_to_ventilate[
              self._current_item_to_ventilate
          ]
          self._ventilate_fn(**item_to_ventilate)
          self._current_item_to_ventilate += 1
          self._ventilated_items_count += 1
  
          if self._current_item_to_ventilate >= len(
              self._items_to_ventilate
          ):
              self._current_item_to_ventilate = 0
              # If iterations was set to None, that means we will iterate until stop is called
              if self._iterations_remaining is not None:
                  self._iterations_remaining -= 1
  
imports: import numpy
  import threading
  from abc import ABCMeta, abstractmethod
  from time import sleep
  import six
label_desc: Use image node_id 6 for calling the ConcurrentVentilator obj's underlying member method code with example usage: obj._ventilate() without return types