def _python_compile(source):
    """
    Generates a Python `code` object (via `compile`).

    args:
        source: (required) string of python code to be compiled

    this actually compiles the template to code
    """
    try:
        code = compile(source, '<string>', 'single')
        return code
    except:
        raise
