@Override
    public String toString() {
        StringJoiner result = new StringJoiner(", ", "(Debug Info {", "})");
        for (Map.Entry<String, String> entry : metadata.entrySet()) {
            result.add(entry.getKey() + "=" + entry.getValue());
        }
        return result.toString();
    }
Returns a string representation that can be used in exception
messages and when debugging.

@return Returns debug info as a string.
smithy-utils/src/main/java/software/amazon/smithy/utils/CodeWriterDebugInfo.java