def get_random_int(upper_bound):
 assert ((upper_bound >= 0) and isinstance(upper_bound, int))
 generator = random.SystemRandom()
 return generator.randrange(0, upper_bound)

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 .