code: public static <T> T getOnlyElement(Iterable<T> iterable) {
      return Iterators.getOnlyElement(iterable.iterator());
    }
docs: Returns the single element contained in {@code iterable}.
  
  <p><b>Java 8 users:</b> the {@code Stream} equivalent to this method is {@code
  stream.collect(MoreCollectors.onlyElement())}.
  
  @throws NoSuchElementException if the iterable is empty
  @throws IllegalArgumentException if the iterable contains multiple elements