human
Complete this python program:
def accepts(*types):
assistant
#Here is the Python program you requested.

    """Decorator to ensure that the decorated function accepts the given types as arguments.
    Example:
    @accepts(int, (int,float))
    @returns((int,float))
    def func(arg1, arg2):
    return arg1 * arg2
    """
    def check_accepts(f):
        assert (len(types) == f.__code__.co_argcount)
        def new_f(*args, **kwds):
            for (a, t) in zip(args, types):
                assert isinstance(a, t), ('arg    %r    does    not    match    %s' % (a, t))
            return f(*args, **kwds)
        new_f.__name__ = f.__name__
        return new_f
    return check_accepts