docs: @SuppressWarnings("unchecked")
      public static <T> List<T> sorted(List<T> list, Comparator<? super T> comparator) {
          List<T> result = new ArrayList<>(list);
          Collections.sort(result, comparator);
          return result;
      }