Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def seed_sequence_state(bit_generator, n_streams=2, entropy=None):
bitgen = getattr(rg, bit_generator)
seed_seq = rg.SeedSequence(entropy)
children = seed_seq.spawn(n_streams)
return [bitgen(child) for child in children]