def _process_extends(self, node, **kwargs):
<EOL>for b in self.ast.find_all(nodes.Block):<EOL><INDENT>if b.name not in self.child_blocks:<EOL><INDENT>self.child_blocks[b.name] = b<EOL><DEDENT>else:<EOL><INDENT>block = self.child_blocks.get(b.name)<EOL>while hasattr(block, '<STR_LIT>'):<EOL><INDENT>block = block.super_block<EOL><DEDENT>block.super_block = b<EOL><DEDENT><DEDENT>parent_template = JinjaToJS(template_root=self.template_root,<EOL>template_name=node.template.value,<EOL>js_module_format=self.js_module_format,<EOL>runtime_path=self.runtime_path,<EOL>include_prefix=self.include_prefix,<EOL>include_ext=self.include_ext,<EOL>child_blocks=self.child_blocks,<EOL>dependencies=self.dependencies)<EOL>self.output.write(parent_template.output.getvalue())<EOL>raise ExtendsException<EOL>
Processes an extends block e.g. `{% extends "some/template.jinja" %}`