#NEWLINE# def get_random_int( upper_bound ) : #NEWLINE# #INDENT# 'Returns a random integer in [0, upper_bound).' #NEWLINE# assert ( ( generator >= 0 ) and isinstance ( upper_bound , int ) ) #NEWLINE# generator = random . SystemRandom ( ) #NEWLINE# return generator . randrange ( 0 , upper_bound )