def args_check(name, func, provided):
        provided = list(provided)
        plen = len(provided)
        # Check to see if a decorator is providing the real function.
        func = getattr(func, '_decorated_function', func)
        args, varargs, varkw, defaults = getargspec(func)
        # First argument is filter input.
        args.pop(0)
        if defaults:
            nondefs = args[:-len(defaults)]
        else:
            nondefs = args
        # Args without defaults must be provided.
        try:
            for arg in nondefs:
                provided.pop(0)
        except IndexError:
            # Not enough
            raise TemplateSyntaxError, "%s requires %d arguments, %d provided" % (name, len(nondefs), plen)

        # Defaults can be overridden.
        defaults = defaults and list(defaults) or []
        try:
            for parg in provided:
                defaults.pop(0)
        except __HOLE__:
            # Too many.
            raise TemplateSyntaxError, "%s requires %d arguments, %d provided" % (name, len(nondefs), plen)

        return True
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-0.96/django/template/__init__.py/FilterExpression.args_check