@Nullable
  public static VirtualFile findVcsRootFor(@NotNull Project project, @Nullable VirtualFile file) {
    VirtualFile root = ProjectLevelVcsManager.getInstance(project).getVcsRootFor(file);
    if (root != null) return root;

    if (file != null) {
      root = getVcsRootForLibraryFile(project, file);
      if (root != null) return root;
    }

    return null;
  }
@Nullable
  public static VirtualFile findVcsRootFor(@NotNull Project project, @Nullable VirtualFile file)