static NeighborProvider cached(NeighborProvider provider) {
        Map<Shape, List<Relationship>> relationships = new ConcurrentHashMap<>();
        return shape -> relationships.computeIfAbsent(shape, provider::getNeighbors);
    }
Caches the results of calling a delegate provider.

@param provider Provider to delegate to and cache.
@return Returns the thread-safe caching neighbor provider.
smithy-model/src/main/java/software/amazon/smithy/model/neighbor/NeighborProvider.java