fn pick_query<'a, T, F>(query_map: &QueryMap, queries: &'a [T], f: F) -> &'a Twhere F: Fn(&T) -> (Span, QueryJobId),