def get_level_lengths(levels, sentinel='<STR_LIT>'):
if len(levels) == <NUM_LIT:0>:<EOL><INDENT>return []<EOL><DEDENT>control = [True] * len(levels[<NUM_LIT:0>])<EOL>result = []<EOL>for level in levels:<EOL><INDENT>last_index = <NUM_LIT:0><EOL>lengths = {}<EOL>for i, key in enumerate(level):<EOL><INDENT>if control[i] and key == sentinel:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>control[i] = False<EOL>lengths[last_index] = i - last_index<EOL>last_index = i<EOL><DEDENT><DEDENT>lengths[last_index] = len(level) - last_index<EOL>result.append(lengths)<EOL><DEDENT>return result<EOL>
For each index in each level the function returns lengths of indexes.

    Parameters
    ----------
    levels : list of lists
        List of values on for level.
    sentinel : string, optional
        Value which states that no new index starts on there.

    Returns
    ----------
    Returns list of maps. For each level returns map of indexes (key is index
    in row and value is length of index).