def restrict_args(func, *args, **kwargs):
callargs = getargspec(func)<EOL>if not callargs.varargs:<EOL><INDENT>args = args[<NUM_LIT:0>:len(callargs.args)]<EOL><DEDENT>return func(*args, **kwargs)<EOL>
Restricts the possible arguements to a method to match the func argument.

restrict_args(lambda a: a, 1, 2)
# => 1