code: public static <T> T first(Collection<T> items, Predicate<T> predicate) {
          T firstOrNull = firstOrNull(items, predicate);
  
          if (firstOrNull == null) {
              throw new InvalidOperationException("No items match!");
          } else {
              return firstOrNull;
          }
      }
docs: Returns the first element from a collection that matches the given predicate.
  Throws a {@link InvalidOperationException} if no matching
  element is found.
  
  @param items source items
  @param predicate predicate function
  @param <T> type of elements in the source collection
  @return the first element that matches the given predicate
  @throws InvalidOperationException if no matching element is found