void (@NotNull StringBuilder builder, @NotNull PyStringElement stringElement) { char originalQuote = stringElement.getQuote().charAt(0); if (stringElement instanceof PyPlainStringElement) { processStringElementText(builder, stringElement.getText(), originalQuote); } else { boolean fStringCanIncludeArbitraryStringLiterals = LanguageLevel.forElement(stringElement).isAtLeast(LanguageLevel.PYTHON312); stringElement.acceptChildren(new PyRecursiveElementVisitor() { @Override public void visitElement(@NotNull PsiElement element) { if (element instanceof PyStringElement) { if (fStringCanIncludeArbitraryStringLiterals) { builder.append(element.getText()); } else { processStringElement(builder, (PyStringElement)element); } } else if (PyTokenTypes.FSTRING_TOKENS.contains(element.getNode().getElementType())) { processStringElementText(builder, element.getText(), originalQuote); } else if (element.getNode().getChildren(null).length == 0) { builder.append(element.getText()); } else { super.visitElement(element); } } }); } }