def compile_template(func):
    try:
        spec = inspect.getargspec(func)
    except __HOLE__:
        spec = ArgSpec((), 'args', 'kwargs', None)

    # Slicing with [1:-1] to get rid of parentheses
    spec_str = inspect.formatargspec(*spec)

    assigns = '\n'.join("        __call.{0} = {0}".format(arg) for arg in spec.args)
    func_str = WRAPPER_TEMPLATE.format(name=func.__name__, spec=spec_str, assigns=assigns)

    env = {}
    # print func_str
    exec func_str in env
    return env['__wrapper_fab']
dataset/ETHPy150Open Suor/funcy/drafts/bench_decorators.py/compile_template