fn take_if_finished( groups: &mut Vec<Group>, at: usize, is_open: &dyn Fn(&str) -> bool, ) -> Option<(String, String)>