private static boolean areInSameHierarchy(@NotNull Url url1, @NotNull Url url2) {
    return isAncestor(url1, url2) || isAncestor(url2, url1);
  }
private static boolean areInSameHierarchy(@NotNull Url url1, @NotNull Url url2)