make_otp(rng=None) returning a 6-character string of digits. Use the random module's choices over the digit characters; accept an optional pre-seeded random.Random instance for testability, defaulting to the module-level functions.make_otp(random.Random(1))
a deterministic 6-digit string like '134878'
Seeding makes the output reproducible for tests.
''.join(choices('0123456789', k=6)).
rng = rng or random — both expose .choices.