docs: public static <R> CloseableIterator<R> iterator(BaseStream<R, Stream<R>> stream) {
        Iterator<R> iterator = stream.iterator();
        if (iterator instanceof CloseableIterator) {
           return (CloseableIterator<R>) iterator;
        }
        return new StreamToCloseableIterator<>(stream, iterator);
     }