boolean (@NotNull PsiElement statement, int offset) { if (!(statement instanceof PyWithStatement)) { return false; } final PsiElement leftParen = PyPsiUtils.getFirstChildOfType(statement, PyTokenTypes.LPAR); return leftParen != null && offset >= leftParen.getTextRange().getEndOffset(); }