public void loadAdditionalPackages(@NotNull List<String> repositories, boolean alwaysRefresh) throws IOException {
    var failedToConnect = new ArrayList<String>();
    if (alwaysRefresh) {
      for (String url : repositories) {
        try {
          myAdditionalPackages.refresh(url);
        }
        catch (Exception e) {
          LOG.error("Error connecting to " + url, e);
          failedToConnect.add(url);
          ApplicationManager.getApplication().getService(PyPackageRepositories.class).markInvalid(url);
        }
      }
    }
    else {
      for (String url : repositories) {
        try {
          getCachedValueOrRethrowIO(myAdditionalPackages, url);
        }
        catch (Exception e) {
          LOG.warn("Error connecting to " + url, e);
          failedToConnect.add(url);
          ApplicationManager.getApplication().getService(PyPackageRepositories.class).markInvalid(url);
        }
      }
    }
    if (!failedToConnect.isEmpty()) {
      PyPackageService packageService = PyPackageService.getInstance();
      failedToConnect.forEach(repo -> packageService.removeRepository(repo));
    }
  }
public void loadAdditionalPackages(@NotNull List<String> repositories, boolean alwaysRefresh)