Design a random number generator with methods generate(), recycle() and checkIfAvailable(), and write test cases to cover all scenarios.
Asked in the Onsite round 4 stage.
Implement run_random_number_generator(max_value, operations, seed). The generator manages integers from 1 through max_value. generate() returns a uniformly selected available number, or None when exhausted. recycle(value) returns True only when a previously generated value is returned to the pool. checkIfAvailable(value) returns a boolean. The wrapper returns each operation's result in order.
def run_random_number_generator(max_value, operations, seed):