code: def random_product(*args, repeat=1):
      "Random selection from itertools.product(*args, **kwds)"
      pools = [tuple(pool) for pool in args] * repeat
      return tuple(random.choice(pool) for pool in poolsf random_product(*args, repeat=1):
      "Random selection from itertools.product(*args, **kwds)"
      pools = [tuple(pool) for pool in args] * repeat
      return tuple(random.choice(pool) for pool in pools)
docs: Random selection from itertools.product(*args, **kwds)