pub fn sample_variants_with_probabilities<K: Eq + Hash + Copy + Sized, RNG: Rng + ?Sized>( rng: &mut RNG, probs: &HashMap<K, f64>, ) -> K