List<PsiElement> (@NotNull PsiElement element, @NotNull PyResolveContext resolveContext) { if (element instanceof PyReferenceOwner) { final PsiPolyVariantReference ref = ((PyReferenceOwner)element).getReference(resolveContext); return filterTopPriorityResults(ref.multiResolve(false)); } else { final PsiReference reference = element.getReference(); return reference != null ? Collections.singletonList(reference.resolve()) : Collections.emptyList(); } }