def __renumber(dictionary, status):
    """Renumber the values of the dictionary from 0 to n
    """
    count = 0
    ret = dictionary.copy()
    new_values = dict([])
    old_com_2_new_com = {}
    for key in dictionary.keys():
        value = dictionary[key]
        new_value = new_values.get(value, -1)
        if new_value == -1:
            new_values[value] = count
            new_value = count
            count += 1
        ret[key] = new_value
        if value not in old_com_2_new_com:
            old_com_2_new_com[value] = new_value
    temp = dict([])
    for k in set(dictionary.values()):
        com_id = old_com_2_new_com[k]
        temp[com_id] = status.com_attr[k]
    status.com_attr = temp
    return ret, status
