void (@NotNull PsiElement element) { // Copied/generated elements are stored in DummyHolder files, not PyFiles if (element.getLanguage().isKindOf(PythonLanguage.INSTANCE)) { element.accept(this); Collections.reverse(myImportStatements); for (PyFromImportStatement statement : myImportStatements) { final PyFromImportStatement newStatement = replaceFromImport(statement); if (myRootElement == statement) { myRootElement = newStatement; } } } }