def get_expected_key_error_user_message(preference_key, preference_value):
 return u"Invalid user preference key '{preference_key}'.".format(preference_key=preference_key)

def get_expected_key_error_user_message ( preference_key , preference_value ) : return u"Invalid user preference key '{preference_key}'." . format ( preference_key = preference_key )
returns the expected user message for an invalid key .