private static void commitSdkPathsIfChanged(@NotNull Sdk sdk,
                                              final @NotNull List<VirtualFile> sdkPaths,
                                              boolean forceCommit) {
    final List<VirtualFile> currentSdkPaths = Arrays.asList(sdk.getRootProvider().getFiles(OrderRootType.CLASSES));
    if (forceCommit || !Sets.newHashSet(sdkPaths).equals(Sets.newHashSet(currentSdkPaths))) {
      changeSdkModificator(sdk, effectiveModificator -> {
        effectiveModificator.removeAllRoots();
        for (VirtualFile sdkPath : sdkPaths) {
          effectiveModificator.addRoot(PythonSdkType.getSdkRootVirtualFile(sdkPath), OrderRootType.CLASSES);
        }
        return true;
      });
    }
  }
private static void commitSdkPathsIfChanged(@NotNull Sdk sdk,
                                              final @NotNull List<VirtualFile> sdkPaths,
                                              boolean forceCommit)