Maybe we can also add that this is equivalent/related to the `numpy.random.choice` function?