code: public static <T extends List<? extends U>, U> Comparator<T> canonicalComparator(Comparator<? super U> elemComp) {
          return new CanonicalComparator<>(elemComp);
      }
docs: Retrieves a canonical comparator for the given list type.
  
  @param elemComp
  the comparator to use for comparing the elements.
  
  @return a comparator for comparing objects of type <code>T</code> based on canonical ordering.