def _process_if(self, node, execute_end=None, **kwargs):
with self._execution():<EOL><INDENT>self.output.write('<STR_LIT>')<EOL>self.output.write('<STR_LIT:(>')<EOL>with option(kwargs, use_python_bool_wrapper=True):<EOL><INDENT>self._process_node(node.test, **kwargs)<EOL><DEDENT>self.output.write('<STR_LIT:)>')<EOL>self.output.write('<STR_LIT:{>')<EOL><DEDENT>if execute_end:<EOL><INDENT>execute_end()<EOL><DEDENT>for n in node.body:<EOL><INDENT>self._process_node(n, **kwargs)<EOL><DEDENT>if not node.else_ and not node.elif_:<EOL><INDENT>with self._execution():<EOL><INDENT>self.output.write('<STR_LIT:}>')<EOL><DEDENT><DEDENT>else:<EOL><INDENT>with self._execution() as execute_end:<EOL><INDENT>self.output.write('<STR_LIT:}>')<EOL>self.output.write('<STR_LIT>')<EOL>for n in node.elif_:<EOL><INDENT>self._process_node(n, execute_end=execute_end, **kwargs)<EOL><DEDENT>if node.elif_ and node.else_:<EOL><INDENT>self.output.write('<STR_LIT>')<EOL><DEDENT>self.output.write('<STR_LIT:{>')<EOL><DEDENT>for n in node.else_:<EOL><INDENT>self._process_node(n, **kwargs)<EOL><DEDENT>with self._execution():<EOL><INDENT>self.output.write('<STR_LIT:}>')<EOL><DEDENT><DEDENT>
Processes an if block e.g. `{% if foo %} do something {% endif %}`