boolean (final PsiElement what, final int rate) { PyPsiUtils.assertValid(what); if (what == null) return false; if (!(what instanceof LightElement) && !what.isValid()) { throw new PsiInvalidElementAccessException(what, "Trying to resolve a reference to an invalid element"); } super.add(new RatedResolveResult(rate, what)); return true; }