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

    generator = random.SystemRandom()
    return generator.randrange(0, upper_bound)
Returns a random integer in [0, upper_bound).
dataset/ETHPy150Open oppia/oppia/utils.py/get_random_int