code: public static <C extends Closeable, T extends Iterable<C>> Closeable forIterable2(
              @Nonnull final Logger log,
              @Nonnull final Iterable<T> closeables
      ) {
          return new Closeable() {
              public void close() throws IOException {
                  closeAll(log, Iterables.transform(closeables, new Function<T, Closeable>() {
                      public Closeable apply(final @Nullable T input) {
                          if (input == null) {
                              return new Closeable() {
                                  public void close() throws IOException {}
                              };
                          } else {
                              return forIterable(log, input);
                          }
                      }
                  }));
              }
          };
      }
docs: Create a composite {@link Closeable} that will close all the wrapped
  {@code closeables} references. The {@link Closeable#close()} method will
  perform a safe close of all wrapped Closeable objects. This is needed
  since successive calls of the {@link #closeAll(Logger, Closeable...)}
  method is not exception safe without an extra layer of try / finally.
  
  This method iterates the provided
  {@code Iterable<? extends Iterable<? extends Closeable>>} and closes
  all subsequent Closeable objects.
  
  @param log The logger to write error messages out to.
  @param closeables An iterator over iterable Closeables.
  @param <C> A class that implements the {@link Closeable} interface.
  @param <T> An iterable collection that contains {@link Closeable} objects.
  @return A composite closeable that wraps all underlying {@code closeables}.