@Contract(pure = true)
  public static @NotNull GlobalSearchScope union(GlobalSearchScope @NotNull [] scopes) {
    if (scopes.length == 0) {
      throw new IllegalArgumentException("Empty scope array");
    }
    if (scopes.length == 1) {
      return scopes[0];
    }
    return UnionScope.create(scopes);
  }
@Contract(pure = true)
  public static @NotNull GlobalSearchScope union(GlobalSearchScope @NotNull [] scopes)