argstr = ', '.join(arglist)
fakefunc = """def func(%s):
    return real_func(%s)
""" % (argstr, argstr)
fakefunc_code = compile(fakefunc, 'fakesource', 'exec')
fakeglobals = {}
eval(fakefunc_code, {'real_func': f}, fakeglobals)
f_with_good_sig = fakeglobals['func']
help(f)
help(f_with_good_sig)
Set function signature in Python