boolean (@NotNull PyImportElement importElement) { final QualifiedName qName = importElement.getImportedQName(); if (qName != null && qName.getComponentCount() == 1) { final String name = importElement.getAsName() != null ? importElement.getAsName() : qName.getLastComponent(); if (nameIsAcceptable(name)) { final PsiElement resolved = importElement.resolve(); if (resolved instanceof PsiNamedElement) { addElement(name, resolved); return true; } } } return false; }