void (@NotNull PyImportStatement node) { super.visitPyImportStatement(node); final PyIfStatement ifParent = PsiTreeUtil.getParentOfType(node, PyIfStatement.class); if (ifParent != null) return; for (PyImportElement importElement : node.getImportElements()) { final QualifiedName qName = importElement.getImportedQName(); if (qName != null) { if (qName.matches("builtins")) { registerForAllMatchingVersions(level -> level.isPython2() && registerForLanguageLevel(level), PyPsiBundle.message("INSP.compatibility.feature.have.module.builtins"), node, new ReplaceBuiltinsQuickFix()); } else if (qName.matches("__builtin__")) { registerForAllMatchingVersions(level -> level.isPy3K() && registerForLanguageLevel(level), PyPsiBundle.message("INSP.compatibility.feature.have.module.builtin"), node, new ReplaceBuiltinsQuickFix()); } } } }