Add a random subset function for easy testing.