public Model removeUnreferencedShapes(Model model, Predicate<Shape> keepFilter) {
        return removeShapes(model, new UnreferencedShapes(keepFilter).compute(model));
    }
Removes shapes (excluding service shapes) that are not referenced by
any other shapes.

Shapes that are part of the prelude or that act as the shape of any
trait, regardless of if the trait is in use in the model, are never
considered unreferenced.

@param model Model to transform.
@param keepFilter Predicate function that accepts an unreferenced
 shape and returns true to remove the shape or false to keep the shape
 in the model.base.
@return Returns the transformed model.base.
smithy-model/src/main/java/software/amazon/smithy/model/transform/ModelTransformer.java