code: def __next__(self):
      result = self.output_queue.get()
      batch_index, result = result
  
      if result is None:
          self.close()
          raise StopIteration()
  
      slot, result = result
      indices = list(self.batches[batch_index])
  
      if IS_CUDA:
          stream = self.cuda_streams[slot]
          # We wait for the copy to be done
          self.current_stream.wait_stream(stream)
  
      return indices, result
  
file_path: avalanche/avalanche/benchmarks/utils/ffcv_support/ffcv_epoch_iterator.py
imports: from threading import Thread, Event, Lock
  from queue import Queue
  from typing import List, Sequence, TYPE_CHECKING
  from ffcv.traversal_order.quasi_random import QuasiRandom
  from ffcv.loader.epoch_iterator import EpochIterator, QUASIRANDOM_ERROR_MSG
  import torch
label_desc: Use image node_id 2 for calling the _CustomEpochIterator obj's underlying member method code with example usage: obj.__next__() and returns: indices,  result