

def do_block(parser, token):
    '\n    Define a block that can be overridden by child templates.\n    '
    bits = token.contents.split()
    if (len(bits) != 2):
        raise TemplateSyntaxError(("'%s' tag takes only one argument" % bits[0]))
    block_name = bits[1]
    try:
        if (block_name in parser.__loaded_blocks):
            raise TemplateSyntaxError(("'%s' tag with name '%s' appears more than once" % (bits[0], block_name)))
        parser.__loaded_blocks.append(block_name)
    except AttributeError:
        parser.__loaded_blocks = [block_name]
    nodelist = parser.parse(('endblock', ('endblock %s' % block_name)))
    parser.delete_first_token()
    return BlockNode(block_name, nodelist)

dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/_internal/django/template/loader_tags.py do_block/original