<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def print_block_num_row(block_num, cliques, next_cliques):
 """Print out a row of padding and a row with the block number. Includes the branches prior to this block number."""

    n_cliques = len(cliques)
    if n_cliques == 0:
        print('|  {}'.format(block_num))
        return

    def mapper(clique):
        block_id, _ = clique
        if block_id not in next_cliques:
            return ' '
        return '|'

    format_str = '{:<' + str(n_cliques * 2) + '} {}'
    branches = list(map(mapper, cliques))
    for end in ('', block_num):
        print(format_str.format(' '.join(branches), end))