class_docstr: Builds a Enqueuer from a PyDataset.
  
  Args:
      py_dataset: A `keras.utils.PyDataset` object.
      use_multiprocessing: use multiprocessing if True, otherwise threading
      shuffle: whether to shuffle the data at the beginning of each epoch
docstr: Wait for the queue to be empty.
docstr_tok: ["Wait","for","the","queue","to","be","empty","."]
code: def _wait_queue(self):
      """Wait for the queue to be empty."""
      while True:
          time.sleep(0.1)
          if (
              self.queue.unfinished_tasks == 0
              or self.stop_signal.is_set()
          ):
              return
  
imports: import multiprocessing.dummy
  import queue
  import random
  import threading
  import time
  import warnings
  import weakref
  from contextlib import closing
  import numpy
  import tree
  from keras.api_export import keras_export
  from keras.trainers.data_adapters import data_adapter_utils
  from keras.trainers.data_adapters.data_adapter import DataAdapter
label_desc: Use image node_id 3 for calling the OrderedEnqueuer obj's underlying member method code with example usage: obj._wait_queue() without return types