def compile_snippet(i):
    ns = {}
    script = ('def func():\n' + (i * snippet))
    if async_:
        script = ('async ' + script)
    code = compile(script, '<script>', 'exec')
    exec(code, ns, ns)
    return ns['func'].__code__
def compile_snippet(i):
    ns = {}
    script = ('def func():\n' + (i * snippet))
    if async_:
        script = ('async ' + script)
    code = compile(script, '<script>', 'exec')
    exec(code, ns, ns)
    return ns['func'].__code__