def register_arguments(func, args=None):
if args is None:<EOL><INDENT>args = func.args.args<EOL>if func.args.vararg:<EOL><INDENT>func.set_local(func.args.vararg, func.args)<EOL><DEDENT>if func.args.kwarg:<EOL><INDENT>func.set_local(func.args.kwarg, func.args)<EOL><DEDENT><DEDENT>for arg in args:<EOL><INDENT>if isinstance(arg, nodes.Name):<EOL><INDENT>func.set_local(arg.name, arg)<EOL><DEDENT>else:<EOL><INDENT>register_arguments(func, arg.elts)<EOL><DEDENT><DEDENT>
add given arguments to local

    args is a list that may contains nested lists
    (i.e. def func(a, (b, c, d)): ...)