'Call a block and register it for the template.'

def visit_Block(self, node, frame):

    level = 1
    if frame.toplevel:
        if self.has_known_extends:
            return
        if (self.extends_so_far > 0):
            self.writeline('if    parent_template    is    None:')
            self.indent()
            level += 1
    if node.scoped:
        context = 'context.derived(locals())'
    else:
        context = 'context'
    self.writeline(('for    event    in    context.blocks[%r][0](%s):' % (node.name, context)), node)
    self.indent()
    self.simple_write('event', frame)
    self.outdent(level)
