def add_to_dict_of_levels(dict_levels, c, cur_level, index):
    """
    Function returns the dict of positions according to the level of space or comma
    Example: {'1_,': [14], '2_,': [9], '0_ ': [3], '1_ ': [12]}
        comma of level 1: position 14
        comma of level 2: position 9
        space of level 0: position 3
        space of level 1: position 12
    """
    symbol = str(cur_level) + '_' + c
    if symbol not in dict_levels:
        dict_levels[symbol] = []
    dict_levels[symbol].append(index)
    return dict_levels