A set of utility functions to perform random sampling from any iterable.