Python implementation of Vose's alias method, an efficient algorithm for sampling from a discrete probability distribution.