@Override
    public List<ValidationEvent> validate(Model model) {
        NeighborProvider provider = NeighborProviderIndex.of(model).getReverseProviderWithTraitRelationships();

        List<ValidationEvent> events = new ArrayList<>();
        for (Shape privateShape : model.getShapesWithTrait(PrivateTrait.class)) {
            validateNeighbors(privateShape, provider.getNeighbors(privateShape), events);
        }

        return events;
    }
Ensures that shapes in separate namespaces don't refer to shapes in other
namespaces that are marked as private.
smithy-model/src/main/java/software/amazon/smithy/model/validation/validators/PrivateAccessValidator.java