boolean (@NotNull ASTNode child) { final PsiElement prev = child.getPsi().getPrevSibling(); if (!(prev instanceof PyStatement)) { return false; } final PsiElement lastChild = PsiTreeUtil.getDeepestLast(prev); return lastChild.getParent() instanceof PyStatementList; }