def get_random_int(upper_bound):
    assert upper_bound >= 0 and isinstance(upper_bound, int)

    generator = random.SystemRandom()
    return generator.randrange(0, upper_bound)
This function will log all un-handled python exceptions.
dataset/ETHPy150Open oppia/oppia/utils.py/get_random_int--crossover with--dataset/ETHPy150Open saltstack/salt/salt/log/setup.py/__global_logging_exception_handler