@Override
    public Model onRemove(ModelTransformer transformer, Collection<Shape> removed, Model model) {
        // Remove members from containers that have been removed from the index.
        Model result = removeMembersFromContainers(transformer, removed, model);
        // Remove members from containers when the member targets a removed shape.
        return transformer.removeShapes(result, findMembersThatNeedRemoval(result, removed));
    }
Cleans up structure, union, enum, and intEnum shapes after shapes are removed.

<ul>
    <li>Ensures that structure and union shapes are updated to no
    longer reference any removed members.</li>
    <li>Ensures that structure/union members that reference shapes
    that have been removed are also removed.</li>
</ul>
smithy-model/src/main/java/software/amazon/smithy/model/transform/plugins/CleanStructureAndUnionMembers.java