def compile(self):
        """
        compile(self) -> None

        Compile self into Python code.
        """

        if self.code is not None:
            return

        level = 0
        source = ''

        for token in self.tokenize():
            indent = ' ' * level * 2

            if token.startswith('###'):
                source = source + '%s_ = _ + %s\n' % \
                    (indent, token[3:].strip())

            elif token.startswith('<?') and token.endswith('?>'):
                content = token[2:-2]

                if content == 'end':
                    level = level - 1

                elif content.startswith('if ') \
                or content.startswith('for ') \
                or content.startswith('while '):
                    source = source + '%s%s:\n' % (indent, content)
                    level = level + 1

                elif content.startswith('='):
                    source = source + '%s_ = _ + %s\n' % \
                        (indent, content[1:].strip())

            else:
                source = source + '%s_ = _ + """%s"""\n' % \
                    (indent, token.replace('"""', r'\"\"\"'))

        self.code = compile(source, '<string>', 'exec')

        compile(self) -> None

        Compile self into Python code.
        
recipes/Python/464766_Trivia_Template/recipe-464766.py