def method_id(name, encode_types):
 function_types = [_canonical_type(type_) for type_ in encode_types]
 function_signature = '{function_name}({canonical_types})'.format(function_name=name, canonical_types=','.join(function_types))
 function_keccak = utils.sha3(function_signature)
 first_bytes = function_keccak[:4]
 return big_endian_to_int(first_bytes)

def method_id ( name , encode_types ) : function_types = [ _canonical_type ( type_ ) for type_ in encode_types ] function_signature = '{function_name}({canonical_types})' . format ( function_name = name , canonical_types = ',' . join ( function_types ) ) function_keccak = utils . sha3 ( function_signature ) first_bytes = function_keccak [ : 4 ] return big_endian_to_int ( first_bytes )
return the unique method id .