boolean (@NotNull PsiElement element) { PyPsiUtils.assertValid(element); if (element instanceof PyReferenceExpression ref && PsiTreeUtil.getParentOfType(element, PyImportElement.class) == null) { if (!ref.isQualified()) { ResolveResult[] resolved = ref.getReference().multiResolve(false); for (ResolveResult rr : resolved) { if (rr.isValidResult()) { if (rr.getElement() == star_ielt) star_references.add(ref.getReference()); for (PyImportElement ielt : ielts) { if (rr.getElement() == ielt) references.put(ref.getReference(), ielt); } } } } } return true; }