pub fn random_argmax<I>(values: I, random: &dyn Random) -> Option<usize>where I: Iterator<Item = f64>,
Returns an index of max element in values. In case of many same max elements, returns the one from them at random.