public NeighborProvider getProviderWithTraitRelationships() {
        NeighborProvider result = providerWithTraits;

        if (result == null) {
            Model model = getOrThrowModel();
            synchronized (this) {
                result = providerWithTraits;
                if (result == null) {
                    providerWithTraits = result = NeighborProvider.cached(
                            NeighborProvider.withTraitRelationships(model, provider));
                }
            }
        }

        return result;
    }
Gets the neighbor provider that includes trait relationships.

@return Returns the provider.
smithy-model/src/main/java/software/amazon/smithy/model/knowledge/NeighborProviderIndex.java