static NeighborProvider precomputed(Model model, NeighborProvider provider) {
        Set<Shape> shapes = model.toSet();
        Map<Shape, List<Relationship>> relationships = new HashMap<>(shapes.size());
        for (Shape shape : shapes) {
            relationships.put(shape, provider.getNeighbors(shape));
        }
        return shape -> relationships.getOrDefault(shape, ListUtils.of());
    }
Creates a NeighborProvider that precomputes the neighbors of a model.

@param model Model to create a neighbor provider for.
@param provider Provider to use when precomputing.
@return Returns the created neighbor provider.
smithy-model/src/main/java/software/amazon/smithy/model/neighbor/NeighborProvider.java