def _applyargs(args, f):
    """Apply arguments to a function.

    Args can be any of the following.
    arg
    (arg1, arg2, ...)
    ((arg1a, arg1b, ...), ...)
    """
    if not hasattr(args, '__iter__'):
        f(args)
    else:
        f(*args)
    return
