@Contract(pure = true)
  public static @NotNull SearchScope restrictScopeTo(@NotNull SearchScope originalScope, FileType @NotNull ... fileTypes) {
    if (originalScope instanceof GlobalSearchScope) {
      return GlobalSearchScope.getScopeRestrictedByFileTypes(
        (GlobalSearchScope)originalScope,
        fileTypes
      );
    }
    return LocalSearchScope.getScopeRestrictedByFileTypes(
      (LocalSearchScope)originalScope,
      fileTypes
    );
  }
@Contract(pure = true)
  public static @NotNull SearchScope restrictScopeTo(@NotNull SearchScope originalScope, FileType @NotNull ... fileTypes)