@register.tag
def repeated_block(parser, token):
    try:
        tag_name, block_name = token.split_contents()
    except __HOLE__:
        raise template.TemplateSyntaxError(
            '{0} tag takes only one argument'.format(
                token.contents.split()[0]))
    # initialize attribute storing block contents on parser
    set_repeated_blocks(parser)
    # do_block is the internal function for creating block tags
    block_node = do_block(parser, token)
    # store block in parser's attribute
    parser._repeated_blocks[block_name] = block_node
    # return a normal block node so that it behaves exactly
    # as people would expect.
    return block_node
dataset/ETHPy150Open nalourie/django-macros/build/lib/macros/templatetags/repeatedblocks.py/repeated_block