private Set<Shape> getServicesToUpdate(Model model, Set<ShapeId> resources, Set<ShapeId> operations) {
        return model.shapes(ServiceShape.class)
                .filter(service -> containsAny(service.getResources(), resources)
                        || containsAny(service.getOperations(), operations))
                .map(service -> {
                    ServiceShape.Builder builder = service.toBuilder();
                    resources.forEach(builder::removeResource);
                    operations.forEach(builder::removeOperation);
                    return builder.build();
                })
                .collect(Collectors.toSet());
    }
Removes operation bindings from resources and services when operations
are removed, and removes resource bindings from services and resources when
resources are removed.
smithy-model/src/main/java/software/amazon/smithy/model/transform/plugins/CleanBindings.java