def hash_dist(x):
 return (int(sha1(bytes(x)).hexdigest(), base=16) & 4294967295)

def hash_dist ( x ) : return ( int ( sha1 ( bytes ( x ) ) . hexdigest ( ) , base = 16 ) & 4294967295 )
for a given distribution .