@Nullable("is null when given optimizer can't provide a scope to restrict")
  default SearchScope getRestrictedUseScope(@NotNull PsiElement element) {
    GlobalSearchScope scopeToExclude = getScopeToExclude(element);

    return scopeToExclude == null ? null : GlobalSearchScope.notScope(scopeToExclude);
  }
@Nullable("is null when given optimizer can't provide a scope to restrict")
  default SearchScope getRestrictedUseScope(@NotNull PsiElement element)