code: static String countDuplicatesAndAddTypeInfo(Iterable<?> itemsIterable) {
      Collection<?> items = iterableToCollection(itemsIterable);
      Optional<String> homogeneousTypeName = getHomogeneousTypeName(items);
  
      return homogeneousTypeName.isPresent()
          ? lenientFormat("%s (%s)", countDuplicates(items), homogeneousTypeName.get())
          : countDuplicates(addTypeInfoToEveryItem(items));
    }
docs: Makes a String representation of {@code items} with collapsed duplicates and additional class
  info.
  
  <p>Example: {@code countDuplicatesAndAddTypeInfo([1, 2, 2, 3]) == "[1, 2 [3 copies]]
  (java.lang.Integer)"} and {@code countDuplicatesAndAddTypeInfo([1, 2L]) == "[1
  (java.lang.Integer), 2 (java.lang.Long)]"}.