code: @SuppressWarnings("unchecked")
    public static <T> Stream<T> stream(Iterable<T> iterable) {
      Assert.notNull(iterable, "Iterable cannot be null");
  
      return (iterable instanceof Collection ? ((Collection) iterable).stream()
        : StreamSupport.stream(iterable.spliterator(), false));
    }
docs: Returns a {@link Stream} from the {@link Iterable} collection of elements.
  
  @param <T> Class type of the elements in the {@link Iterable}.
  @param iterable {@link Iterable} collection of elements to convert into a {@link Stream}.
  @return a {@link Stream} for the elements in the {@link Iterable}.
  @throws IllegalArgumentException if {@link Iterable} is null.
  @see java.util.stream.Stream
  @see java.lang.Iterable