public Symbol escapeSymbol(Shape shape, Symbol symbol) {
            // Only escape symbols when the predicate returns true.
            if (!escapePredicate.test(shape, symbol)) {
                return symbol;
            }

            String newName = convertWord("name", symbol.getName(), nameReservedWords);
            String newNamespace = convertWord("namespace", symbol.getNamespace(), namespaceReservedWords);
            String newDeclarationFile = convertWord("filename", symbol.getDeclarationFile(), filenameReservedWords);
            String newDefinitionFile = convertWord("filename", symbol.getDefinitionFile(), filenameReservedWords);

            // Only create a new symbol when needed.
            if (newName.equals(symbol.getName())
                    && newNamespace.equals(symbol.getNamespace())
                    && newDeclarationFile.equals(symbol.getDeclarationFile())
                    && newDefinitionFile.equals(symbol.getDeclarationFile())) {
                return symbol;
            }

            return symbol.toBuilder()
                    .name(newName)
                    .namespace(newNamespace, symbol.getNamespaceDelimiter())
                    .declarationFile(newDeclarationFile)
                    .definitionFile(newDefinitionFile)
                    .build();
        }
Escapes the given symbol using the reserved words implementations
registered for each component.

@param shape Shape being turned into a {@code Symbol}.
@param symbol {@code Symbol} to escape.
@return Returns the escaped {@code Symbol}.
smithy-codegen-core/src/main/java/software/amazon/smithy/codegen/core/ReservedWordSymbolProvider.java