def print_spans(spans, max_idx: int) -> None:
    """Quick test to show how character spans match original BEL String

    Mostly for debugging purposes
    """

    bel_spans = [" "] * (max_idx + 3)
    for val, span in spans:
        if val in ["Nested", "NSArg"]:
            continue
        for i in range(span[0], span[1] + 1):
            bel_spans[i] = val[0]

    # print(''.join(bel_spans))

    # Add second layer for Nested Objects if available
    bel_spans = [" "] * (max_idx + 3)
    for val, span in spans:
        if val not in ["Nested"]:
            continue
        for i in range(span[0], span[1] + 1):
            bel_spans[i] = val[0]
def print_spans ( spans , max_idx : int ) -> None : bel_spans = [ " " ] * ( max_idx + 3 ) for val , span in spans : if val in [ "Nested" , "NSArg" ] : continue for i in range ( span [ 0 ] , span [ 1 ] + 1 ) : bel_spans [ i ] = val [ 0 ] bel_spans = [ " " ] * ( max_idx + 3 ) for val , span in spans : if val not in [ "Nested" ] : continue for i in range ( span [ 0 ] , span [ 1 ] + 1 ) : bel_spans [ i ] = val [ 0 ]
Quick test to show how character spans match original BEL String

    Mostly for debugging purposes