boolean (@NotNull PsiElement elem) { if (elem instanceof PySequenceExpression || elem instanceof PyComprehensionElement || elem instanceof PyParenthesizedExpression) { return PyTokenTypes.OPEN_BRACES.contains(elem.getFirstChild().getNode().getElementType()) && !PyTokenTypes.CLOSE_BRACES.contains(elem.getLastChild().getNode().getElementType()); } return false; }