code: def __init__(self, dataset=None, generate_batch=None, num_process=5):
      assert (
          generate_batch is not None
      ), "Batch generation function is not specified"
      assert dataset is not None, "Dataset is not specified"
      self._q = None
      self._dataset = dataset
      self._runner_list = []
      self._start = False
      self._num_process = num_process
      self._generate_batch = generate_batch
      self.name = self._dataset.name
  
file_path: openrec/openrec/tf1/utils/samplers/sampler.py
imports: from multiprocessing import Process, Queue
label_desc: Use image node_id 1 to create a new Sampler object from inherited base classes: object with example: obj = Sampler(dataset, generate_batch, num_process)