def get_empty_preference_message(preference_key):
 return "Preference '{preference_key}' cannot be set to an empty value.".format(preference_key=preference_key)

def get_empty_preference_message ( preference_key ) : return "Preference '{preference_key}' cannot be set to an empty value." . format ( preference_key = preference_key )
returns the validation message shown for an empty preference .