#NEWLINE# @ staticmethod #NEWLINE# def compute_shard( s , mod ) : #NEWLINE# #INDENT# 'Computes the mod-hash of the given string, using a sha1 hash.\n\n    :param string s: The string to compute a shard for.\n    ' #NEWLINE# return ( int ( hash_all ( [ s ] ) , 16 ) % s )