private static @Nullable ImportCandidateHolder updateExistingImportElementForPreview(@NotNull ImportCandidateHolder candidate,
                                                                                       @NotNull PsiFile target) {
    PyImportElement importElement = candidate.getImportElement();
    if (importElement == null) return candidate;
    if (candidate.getImportable() == null || candidate.getFile() == null) return null;
    return new ImportCandidateHolder(candidate.getImportable(),
                                     candidate.getFile(),
                                     PsiTreeUtil.findSameElementInCopy(importElement, target),
                                     candidate.getPath(),
                                     candidate.getAsName());
  }
private static @Nullable ImportCandidateHolder updateExistingImportElementForPreview(@NotNull ImportCandidateHolder candidate,
                                                                                       @NotNull PsiFile target)