Ah I think that should work? But I find it confusing that the description says that:

Samples elements randomly from a given list of indices, without replacement.

but at the same time it receives a list of indices. Do you know what’s the deal with that?