code: @CanIgnoreReturnValue // TODO(kak): Consider removing this?
    @Nullable
    public static <T> T getOnlyElement(Iterator<? extends T> iterator, @Nullable T defaultValue) {
      return iterator.hasNext() ? getOnlyElement(iterator) : defaultValue;
    }
docs: Returns the single element contained in {@code iterator}, or {@code
  defaultValue} if the iterator is empty.
  
  @throws IllegalArgumentException if the iterator contains multiple
  elements.  The state of the iterator is unspecified.