private Collection<Shape> getStructureReplacements(Model model, Collection<Shape> removed) {
        return createUpdatedShapes(model, removed, Shape::asStructureShape, entry -> {
            StructureShape.Builder builder = entry.getKey().toBuilder();
            for (MemberShape member : entry.getValue()) {
                builder.removeMember(member.getMemberName());
            }
            return builder.build();
        });
    }
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