@Override
    public Model onRemove(ModelTransformer transformer, Collection<Shape> removed, Model model) {
        Set<ShapeId> removedShapeIds = removed.stream().map(Shape::getId).collect(Collectors.toSet());
        model = transformer.replaceShapes(model, getAuthDefShapesToReplace(model, removedShapeIds));

        return transformer.replaceShapes(model, getProtocolDefShapesToReplace(model, removedShapeIds));
    }
Removes traits from {@link AuthDefinitionTrait} and
{@link ProtocolDefinitionTrait} traits that refer to removed shapes.
smithy-model/src/main/java/software/amazon/smithy/model/transform/plugins/CleanTraitDefinitions.java