def ordered_indices(self):
        """Return an ordered list of indices. Batches will be constructed based
        on this order."""
        if self.shuffle:
            indices = np.random.permutation(len(self))
        else:
            indices = np.arange(len(self))
        return indices[np.argsort(self.sizes[indices], kind="mergesort")]
Return an ordered list of indices. Batches will be constructed based
        on this order.
structured_prompting/fairseq-version/fairseq/fairseq/data/denoising_dataset.py