private static <T> T getFromProviders(@NotNull PsiElement psiElement,
                                        T defaultValue, @NotNull Function<? super FindUsagesProvider, ? extends T> getter) {
    Language language = psiElement.getLanguage();
    List<FindUsagesProvider> providers = INSTANCE.allForLanguage(language);
    assert !providers.isEmpty() : "Element: " + psiElement + ", language: " + language;

    for (FindUsagesProvider provider : providers) {
      T res = getter.apply(provider);
      if (res != null && !res.equals(defaultValue)) {
        return res;
      }
    }
    return defaultValue;
  }
private static <T> T getFromProviders(@NotNull PsiElement psiElement,
                                        T defaultValue, @NotNull Function<? super FindUsagesProvider, ? extends T> getter)