def get_buffer_batch(self):
        """
        Auxiliary function to obtained the next batch

        :return: Batch from the buffer
        """

        try:
            b_batch = next(self.iter_replay)
        except:
            self.iter_replay = iter(self.replay_loader)
            b_batch = next(self.iter_replay)

        return b_batch

        Auxiliary function to obtained the next batch

        :return: Batch from the buffer
        
avalanche/training/plugins/rar.py