Python implementation of a weighted set, supporting draw-with-replacement and draw-without-replacement.