<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _ensure_format(rule, attribute, res_dict):
 """Verifies that attribute in res_dict is properly formatted. Since, in the .ini-files, lists are specified as ':' separated text and UUID values can be plain integers we need to transform any such values into proper format. Empty strings are converted to None if validator specifies that None value is accepted. """

    if rule == 'type:uuid' or (rule == 'type:uuid_or_none' and
                               res_dict[attribute]):
        res_dict[attribute] = uuidify(res_dict[attribute])
    elif rule == 'type:uuid_list':
        if not res_dict[attribute]:
            res_dict[attribute] = []
        else:
            temp_list = res_dict[attribute].split(':')
            res_dict[attribute] = []
            for item in temp_list:
                res_dict[attribute].append = uuidify(item)
    elif rule == 'type:string_or_none' and res_dict[attribute] == "":
        res_dict[attribute] = None