boolean (@NotNull PyStatementList statementList) { final PyStatement[] statements = statementList.getStatements(); if (statements.length == 0) { return false; } final PyStatement last = statements[statements.length - 1]; return last instanceof PyReturnStatement || last instanceof PyRaiseStatement || last instanceof PyPassStatement || isEllipsis(last); }