public static <K, V, T> Map<K, V> transformToImmutableMap(Collection<T> originCollection,
            Function<T, K> keyTransformFunction,
            Function<T, V> valueTransformFunction) {
        if (CollectionUtils.isEmpty(originCollection)) {
            return ImmutableMap.of();
        }
        Preconditions.expectNotNull(keyTransformFunction, "KeyTransformFunction cannot be null");
        Preconditions.expectNotNull(valueTransformFunction, "ValueTransformFunction cannot be null");

        ImmutableMap.Builder<K, V> builder = ImmutableMap.builder();
        originCollection.forEach(originObject -> builder.put(keyTransformFunction.apply(originObject),
                valueTransformFunction.apply(originObject)));
        return builder.build();
    }
Transform input collection to ImmutableMap, if input collection is null, then return empty map

@param originCollection       origin collection
@param keyTransformFunction   key transform function
@param valueTransformFunction value transform function
@param <K>                    key type
@param <V>                    value type
@param <T>                    origin type
@return {@link ImmutableMap}
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/util/InlongCollectionUtils.java