...
SEED = 12345...
rg = np.random.default_rng(SEED)
function_to_test(rg)
rg = npp.random.default_rng(SEED)
function_to_test(rg)
Resetting the state of the underlying BitGenerator in-place is possible, as Kevin showed, but if you can refactor your code so that there isn't a persistent Generator object between these runs, that's probably better. It's a code smell if you can't just pass in a fresh Generator; in general, it means that your code is harder to use, not just because we don't expose an in-place seed() method.
--
Robert Kern