Model transform(ModelTransformer transformer, Model model) {
        return transformer.removeShapes(model,
                model.shapes()
                        .filter(shape -> canFilterShape(model, shape))
                        .filter(FunctionalUtils.not(predicate))
                        .collect(Collectors.toSet()));
    }
Filters shapes out of a model that do not match a predicate.

<p>Members of lists, sets, and maps are not passed to the filter
function or eligible for removal.

<p>If a shape is removed from the model that is a trait definition,
all instances of that trait are automatically removed.

@see ModelTransformer#filterShapes
smithy-model/src/main/java/software/amazon/smithy/model/transform/FilterShapes.java