PyExpression (@NotNull PyStringLiteralExpression element) { final PsiElement parent = element.getParent(); if (parent instanceof PyBinaryExpression binaryExpr) { if (binaryExpr.isOperator("%")) { PyExpression expr = binaryExpr.getRightExpression(); while (expr instanceof PyParenthesizedExpression) { expr = ((PyParenthesizedExpression)expr).getContainedExpression(); } return expr; } } return null; }