src/transformers/models/transfo_xl/tokenization_transfo_xl.py/LMShuffledIterator/get_sent_stream
class LMShuffledIterator:    def get_sent_stream(self):
        # index iterator
        epoch_indices = np.random.permutation(len(self.data)) if self.shuffle else np.array(range(len(self.data)))

        # sentence iterator
        for idx in epoch_indices:
            yield self.data[idx]