code: public static boolean retainAll(
        Iterable<?> removeFrom, Collection<?> elementsToRetain) {
      return (removeFrom instanceof Collection)
          ? ((Collection<?>) removeFrom).retainAll(checkNotNull(elementsToRetain))
          : Iterators.retainAll(removeFrom.iterator(), elementsToRetain);
    }
docs: Removes, from an iterable, every element that does not belong to the
  provided collection.
  
  <p>This method calls {@link Collection#retainAll} if {@code iterable} is a
  collection, and {@link Iterators#retainAll} otherwise.
  
  @param removeFrom the iterable to (potentially) remove elements from
  @param elementsToRetain the elements to retain
  @return {@code true} if any element was removed from {@code iterable}