add tagging support

Я переделал, добавил функцию
def tree_to_list(dictionary, height):
    """
    Used to convert a dictionary of dictionaries the list.
    The list consists of lists, that include 3 elements: value(str), height(int), leaf(boolean).
    """
    result = []
    for item in dictionary.items():
        if item[1]:
            result.append([item[0], height, False])
            result += tree_to_list(item[1], height+1)
        else:
            result.append([item[0], height, True])
    return result
только не коммитил еще