docs: public static <T> List<T> flatten(Collection<List<T>> nestedList) {
      List<T> result = new ArrayList<T>();
      for (List<T> list : nestedList) {
        result.addAll(list);
      }
      return result;
    }