PsiElement (@NotNull PyFromImportStatement importStatement, @Nullable QualifiedName qualifiedName) { final Couple<PsiElement> range = getRelativeImportSourceRange(importStatement); if (range != null && qualifiedName != null) { if (range.getFirst() != range.getSecond()) { importStatement.deleteChildRange(range.getFirst().getNextSibling(), range.getSecond()); } replaceWithQualifiedExpression(range.getFirst(), qualifiedName); } return importStatement; }