boolean (@Nullable PsiElement uexpr) { if (uexpr == null || !myContext.getTypeEvalContext().maySwitchToAST(uexpr)) { return false; } final PyComprehensionElement comprehensionElement = PsiTreeUtil.getParentOfType(uexpr, PyComprehensionElement.class); return comprehensionElement != null && PyUtil.isOwnScopeComprehension(comprehensionElement); }