class_docstr: Wraps iterator/generator passed to External Source to enforce
  ES `cycle` policy specified by the user.
  It is a counterpart of _CycleIter/_CycleGenIter wrappers from non parallel mode.
  However due to prefetching in parallel mode `cycle`=raise
  will raise StopIteration in consecutive calls until the new epoch starts
  (i.e. which happens with pipeline.reset call)
class_docstr_tok: ["Wraps","iterator\/generator","passed","to","External","Source","to","enforce","ES","`","cycle","`","policy","specified","by","the","user",".","It","is","a","counterpart","of","_CycleIter\/_CycleGenIter","wrappers","from","non","parallel","mode",".","However","due","to","prefetching","in","parallel","mode","`","cycle","`","=raise","will","raise","StopIteration","in","consecutive","calls","until","the","new","epoch","starts","(","i.e",".","which","happens","with","pipeline.reset","call",")"]
code: def _get_next(self):
      try:
          return next(self.iter)
      except StopIteration:
          self.raised_stop_iter = True
          if (
              self.source_desc.cycle != "quiet"
              and self.source_desc.cycle is not True
          ):
              raise
          # in quiet mode immediately reset the source and return the first iteration
          self.iter = IterableSource.get_iter(self.source_desc)
          next_iter = next(self.iter)
          # Set the `raised_stop_iter` flag to False after the __next__ call, so that,
          # if it raises StopIteration immediately after the reset, the wrapper can consistently
          # raise StopIteration from then on.
          # The `epoch_start` is not updated - keeping track of it is not necessary
          # in the quiet mode
          self.raised_stop_iter = False
          return next_iter
  
imports: from typing import List, Optional, Tuple
  import threading
  import traceback
  import socket
  from collections import deque
  from multiprocessing import reduction
  from nvidia.dali._utils.external_source_impl import SourceKind, _is_generator_function
  from nvidia.dali._multiproc.shared_batch import SharedBatchWriter, SharedBatchMeta, BufShmChunk, assert_valid_data_type, read_shm_message, write_shm_message
  from nvidia.dali._multiproc.messages import CompletedTask, WorkerArgs, ShmMessageDesc, ScheduledTask
  from nvidia.dali._multiproc.shared_queue import Dispatcher
label_desc: Use image node_id 4 for calling the IterableSource obj's underlying member method code with example usage: obj._get_next() and returns: next, next_iter