def ordered_indices(self):
        """
        Return an ordered list of indices. Batches will be constructed based
        on this order.
        """
        if self.shuffle:
            return np.random.permutation(len(self))
        else:
            order = [np.arange(len(self))]
            order.append(self.sizes)
            return np.lexsort(order)

        Return an ordered list of indices. Batches will be constructed based
        on this order.
        
understand_icl/fairseq/fairseq/data/legacy/masked_lm_dataset.py