def compose(*funcs):
if not funcs:<EOL><INDENT>return lambda *args: args[<NUM_LIT:0>] if args else None<EOL><DEDENT>if len(funcs) == <NUM_LIT:1>:<EOL><INDENT>return funcs[<NUM_LIT:0>]<EOL><DEDENT>last = funcs[-<NUM_LIT:1>]<EOL>rest = funcs[<NUM_LIT:0>:-<NUM_LIT:1>]<EOL>return lambda *args: reduce(lambda ax, func: func(ax),<EOL>reversed(rest), last(*args))<EOL>
chained function composition wrapper

creates function f, where f(x) = arg0(arg1(arg2(...argN(x))))

if *funcs is empty, an identity function is returned.

Args:
    *funcs: list of functions to chain

Returns:
    a new function composed of chained calls to *args