boolean (@NotNull PyReferenceExpression node, @Nullable PsiElement resolved) { return resolved instanceof PyTargetExpression && PyUtil.inSameFile(node, resolved) && resolved.getParent() instanceof PyAssignmentExpression && PsiTreeUtil.getParentOfType( PsiTreeUtil.getParentOfType(resolved.getParent(), PyComprehensionElement.class, true, PyConditionalStatementPart.class), PyConditionalStatementPart.class ) != null; }