code: def get_epoch_iterator(self, **kwargs):
          
          if not self._fresh_state:
              self.next_epoch()
          else:
              self._fresh_state = False
          return super(DataStream, self).get_epoch_iterator(**kwargs)
docs: Get an epoch iterator for the data stream.