code: public static <U extends Comparable<? super U>> int canonicalCompare(List<? extends U> o1, List<? extends U> o2) {
          int siz1 = o1.size(), siz2 = o2.size();
          if (siz1 != siz2) {
              return siz1 - siz2;
          }
  
          return lexCompare(o1, o2);
      }
docs: Compares two {@link List}s of {@link Comparable} elements with respect to canonical ordering.
  <p>
  In canonical ordering, a sequence {@code o1} is less than a sequence {@code o2} if {@code o1} is shorter than
  {@code o2}, or if they have the same length and {@code o1} is lexicographically smaller than {@code o2}.
  
  @param o1
  the first list
  @param o2
  the second list
  
  @return the result of the comparison