private static @Nullable VirtualFile sdkPathToRoot(@NotNull Sdk sdk, @Nullable String path) {
    if (path != null && !FileUtilRt.extensionEquals(path, "egg-info")) {
      // TODO: Refactor SDK so they can provide exclusions for root paths
      final VirtualFile condaFolder = PythonSdkUtil.isConda(sdk) ? PythonSdkUtil.getCondaDirectory(sdk) : null;

      final VirtualFile virtualFile = StandardFileSystems.local().refreshAndFindFileByPath(path);
      if (virtualFile != null && !virtualFile.equals(condaFolder)) {
        return PythonSdkType.getSdkRootVirtualFile(virtualFile);
      }
    }

    return null;
  }
private static @Nullable VirtualFile sdkPathToRoot(@NotNull Sdk sdk, @Nullable String path)