private void findAndReplaceFromImports(@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 (PyAstFromImportStatement statement : myImportStatements) {
          final PyAstFromImportStatement newStatement = replaceFromImport(statement);
          if (myRootElement == statement) {
            myRootElement = newStatement;
          }
        }
      }
    }
private void findAndReplaceFromImports(@NotNull PsiElement element)