public Model replaceShapes(Model model, Collection<? extends Shape> shapes) {
        if (shapes.isEmpty()) {
            return model;
        }

        return new ReplaceShapes(shapes).transform(this, model);
    }
Adds or replaces shapes into the model while ensuring that the model
is in a consistent state.

@param model Model to transform.
@param shapes Shapes to add or replace in the model.base.
@return Returns the transformed model.base.
smithy-model/src/main/java/software/amazon/smithy/model/transform/ModelTransformer.java