code: def __init__(self, *args, **kwargs):
      super().__init__(*args, **kwargs)
  
      if self.reader.num_epochs is not None:
          raise ValueError("Need to set num_epochs as None in reader.")
  
      self.data_loader = BatchedDataLoader(
          self.reader,
          batch_size=self.batch_size,
          shuffling_queue_capacity=self.shuffling_queue_capacity,
      )
      self.iterator = iter(self.data_loader)
  
imports: from petastorm.pytorch import BatchedDataLoader, InMemBatchedDataLoader
  from horovod.data import BaseDataLoader, AsyncDataLoaderMixin
label_desc: Use image node_id 1 to create a new PytorchInfiniteDataLoader object from inherited base classes: PytorchDataLoader with example: obj = PytorchInfiniteDataLoader()