public static <T, K, U> Collector<T, ?, Map<K, U>> toUnmodifiableLinkedMap(Function<? super T, ? extends K> keyMapper,
                                                                                Function<? super T, ? extends U> valueMapper) {
        return collectingAndThen(toLinkedMap(keyMapper, valueMapper), Collections::unmodifiableMap);
    }
Helper function to create mapping from metric to consumers.
TODO: consider reversing the mapping in metrics-consumers.def instead: metric{}.consumer[]
metrics-proxy/src/main/java/ai/vespa/metricsproxy/core/MetricsConsumers.java