code: public static <T> /* @Nullable */ T random(final @NonNull Random random, final @NonNull Iterable<T> iterable, final @NonNull Collection<T> allowed) {
      return random(random, Iterables.filter(iterable, allowed::contains));
    }
docs: Gets a random element from an iterable.
  
  @param random the random
  @param iterable the iterable
  @param allowed a collection of allowed values
  @param <T> the type
  @return a random element