boolean (@NotNull PsiElement statement, int offset) { if (!(statement instanceof PyCaseClause caseClause)) { return false; } final PyPattern pattern = caseClause.getPattern(); if (pattern == null) { return false; } final PsiElement leftParen = PyPsiUtils.getChildByFilter(pattern, PyTokenTypes.OPEN_BRACES, 0); return leftParen != null && offset >= leftParen.getTextRange().getEndOffset(); }