private void markTargetImportsAsUsed(@NotNull PsiPolyVariantReference reference) {
    final ResolveResult[] resolveResults = reference.multiResolve(false);
    for (ResolveResult resolveResult : resolveResults) {
      if (resolveResult instanceof ImportedResolveResult) {
        final PyImportedNameDefiner definer = ((ImportedResolveResult)resolveResult).getDefiner();
        if (definer != null) {
          myUsedImports.add(definer);
        }
      }
    }
  }
private void markTargetImportsAsUsed(@NotNull PsiPolyVariantReference reference)