code: public static <T> CloseableIterable<T> chain(final Iterable<? extends CloseableIterable<? extends T>> iterables) {
          requireNonNull(iterables);
  
          //Don't use CloseableIterators here, as Iterables can reiterate over their data
          //and don't want to close it on them.
          return new FluentCloseableIterable<T>() {
              @Override
              protected void doClose() {
                  for (CloseableIterable<? extends T> curr : iterables)
                      curr.closeQuietly();
              }
  
              @Override
              protected Iterator<T> retrieveIterator() {
                  return Iterators.concat(iterators(iterables));
              }
          };
      }
docs: Combines multiple closeable iterables into a single closeable iterable.
  The returned closeable iterable has an iterator that traverses the elements
  of each iterable in {@code inputs}. The input iterators are not polled until
  necessary.