boolean (@NotNull PyExpression node) { if (node instanceof PyGeneratorExpression) { final PsiElement firstChild = node.getFirstChild(); if (firstChild != null && firstChild.getNode().getElementType() != PyTokenTypes.LPAR) { return true; } } return false; }