fn vec_len_map<K, V>(map: BTreeMap<K, Vec<V>>) -> BTreeMap<K, usize>where K: Ord,
Helper: maps each Vec<V> to its length.
Vec<V>