How to get indices of items in "iters" created using BucketIterator?

I have created iters(train, test, and validation) using BucketIterator.splits. I want to know if there is any way I can get the list of indices of items landed in the “test_iter” and further in batches? Thank you in advance!

train_iter, test_iter, val_iter = BucketIterator.splits(
                                    (train_data, test_data, val_data),
                                    device = device,
                                    batch_size = 250,
                                    sort_within_batch = True,
                                  sort_key = lambda x: len(x.mml))