@Deprecated
    public static <T extends ToShapeId> Map<String, List<ShapeId>> findDuplicateShapeNames(Collection<T> shapes) {
        return shapes.stream()
                .map(ToShapeId::toShapeId)
                // Exclude IDs with members since these need to be validated separately.
                .filter(id -> !id.hasMember())
                // Group by the lowercase name of each shape, and collect the shape IDs as strings.
                .collect(groupingBy(id -> id.getName().toLowerCase(Locale.US)))
                .entrySet()
                .stream()
                // Only keep entries that have duplicates.
                .filter(entry -> entry.getValue().size() > 1)
                // Sort by the member name and collect into an ordered map to preserve sort order.
                .sorted(Comparator.comparing(Map.Entry::getKey))
                .collect(toMap(Map.Entry::getKey, entry -> {
                    // Sort the shape IDs.
                    entry.getValue().sort(Comparator.comparing(ShapeId::toString));
                    return entry.getValue();
                }, (a, b) -> b, LinkedHashMap::new));
    }
Writes the contents of a Node to a pretty-printed JSON string surrounded in backticks.

@param node Node to write.
@return Returns a string suitable for Markdown rendering.
smithy-model/src/main/java/software/amazon/smithy/model/validation/ValidationUtils.java