RatedResolveResult (RatedResolveResult el) { final PsiElement element = el.getElement(); return element instanceof PsiDirectory ? el.replace(PyUtil.getPackageElement((PsiDirectory)element, this)) : el; }