def compile(self, source, filename="<string>"):
    """
    Compile the template source into a code object suitable for execution
    with exec or eval.
    
    source - template (Python) source to compile.
    filename - the filename used in the compiled code.  This name will be
               used in tracebacks.
    """
    mod = compiler.parse(source)
    misc.set_filename(filename, mod)
    self.preorder(mod, self)
    generator = pycodegen.ModuleCodeGenerator(mod)
    code = generator.getCode()
    return code

    Compile the template source into a code object suitable for execution
    with exec or eval.
    
    source - template (Python) source to compile.
    filename - the filename used in the compiled code.  This name will be
               used in tracebacks.
    
recipes/Python/440629_Good_enough_templating/recipe-440629.py