pub fn gen_usize_with_weights(high: usize, weights: &[usize]) -> Option<usize>
Get a usize value by given weights.