public static <T> Collector<T, ?, Set<T>> toUnmodifiableSet() {
        return Collectors.collectingAndThen(Collectors.toSet(), Collections::unmodifiableSet);
    }
Creates a collector that collects into an unmodifiable set.

<p>This is a polyfill equivalent of Java 10's
{@code Collectors#toUnmodifiableSet}.

@param <T> the Set's value type.
@return a Collector that accumulates the entries into an unmodifiable Set.
smithy-utils/src/main/java/software/amazon/smithy/utils/SetUtils.java