def uniform_sample(pool: Sequence[Any], max_num_items: int) -> Sequence[Any]:
  """Samples k items using uniform sampling without replacement."""
  pool = list(pool)
  random.shuffle(pool)
  return pool[:max_num_items]
Samples k items using uniform sampling without replacement.
language/casper/utils/sample_utils.py