code: public static <T> boolean listContainsDuplicates(List<T> list) {
          return list.size() != new HashSet<>(list).size();
      }
docs: Determines whether a list contains the same example more than once.
  
  @param list The list that may or may not contain duplicates.
  @param <T> The type of example.
  @return Whether the given list contains duplicates.