void (PsiElement psiElement, @Nullable RenameProcessor renameProcessor, @NotNull String newName, Collection<? super PsiElement> elementsToInvert) { final Collection<PsiReference> refs = ReferencesSearch.search(psiElement).findAll(); for (PsiReference ref : refs) { final PsiElement refElement = ref.getElement(); if (!collectElementsToInvert(psiElement, refElement, elementsToInvert)) { collectForeignElementsToInvert(psiElement, refElement, PythonLanguage.getInstance(), elementsToInvert); } } }