def versioned_hmac(secret, body, global_version=GLOBAL_TOKEN_VERSION):
 assert (global_version <= GLOBAL_TOKEN_VERSION), ("Invalid version signing version '%s'!" % global_version)
 return hmac.new(secret, body, hashlib.sha256).hexdigest()

def versioned_hmac ( secret , body , global_version = GLOBAL_TOKEN_VERSION ) : assert ( global_version <= GLOBAL_TOKEN_VERSION ) , ( "Invalid version signing version '%s'!" % global_version ) return hmac . new ( secret , body , hashlib . sha256 ) . hexdigest ( )
provide an hex hmac for the provided global_version .