This is extracted from the previos PR as an improved non-cryptographic PRNG option.
gen := context.random_generator
rand