@NotNull
    private Comparator<PyImportElement> getFromNamesComparator() {
      final Comparator<String> stringComparator = AddImportHelper.getImportTextComparator(myFile);
      final Comparator<QualifiedName> qNamesComparator = Comparator.comparing(QualifiedName::toString, stringComparator);
      return Comparator
        .comparing(PyImportElement::getImportedQName, Comparator.nullsFirst(qNamesComparator))
        .thenComparing(PyImportElement::getAsName, Comparator.nullsFirst(stringComparator));
    }
@NotNull
    private Comparator<PyImportElement> getFromNamesComparator()