def randomization_bin(seed, problem_id):
 r_hash = hashlib.sha1()
 r_hash.update(str(seed))
 r_hash.update(str(problem_id))
 return (int(r_hash.hexdigest()[:7], 16) % NUM_RANDOMIZATION_BINS)

def randomization_bin ( seed , problem_id ) : r_hash = hashlib . sha1 ( ) r_hash . update ( str ( seed ) ) r_hash . update ( str ( problem_id ) ) return ( int ( r_hash . hexdigest ( ) [ : 7 ] , 16 ) % NUM_RANDOMIZATION_BINS )
pick a randomization bin for the problem given the users seed and a problem id .