boolean (@NotNull PsiElement e) { if (e instanceof PyWithStatement) { ASTNode n = e.getNode().findChildByType(PyElementTypes.STATEMENT_LISTS); if (n != null) { final PyStatementList statementList = (PyStatementList)n.getPsi(); if (statementList != null) { final PyStatement[] statements = statementList.getStatements(); return statements.length == 1 && !(statements[0] instanceof PyPassStatement) || statements.length > 1; } } } return false; }