private void addToExistingImport(@NotNull ImportCandidateHolder item) {
    PyImportElement importElement = item.getImportElement();
    assert importElement != null;
    // did user choose 'import' or 'from import'?
    PsiElement parent = importElement.getParent();
    if (parent instanceof PyFromImportStatement) {
      AddImportHelper.addNameToFromImportStatement((PyFromImportStatement)parent, item.getImportableName(), item.getAsName());
    }
    else { // just 'import'
      // all we need is to qualify our target
      PyElementGenerator gen = PyElementGenerator.getInstance(myTarget.getProject());
      myTarget.replace(gen.createExpressionFromText(LanguageLevel.forElement(myTarget), importElement.getVisibleName() + "." + myName));
    }
  }
private void addToExistingImport(@NotNull ImportCandidateHolder item)