def iter_args(function):
    @functools.wraps(function)
    def wrapper(*args, **kwargs):
        if len(args) == 1 and isinstance(args[0], collections.Iterable):
            return function(*args[0])
        else:
            return function(*args)
    return wrapper
Decorator to allow function to take either *args or
dataset/ETHPy150Open mapbox/rasterio/rasterio/windows.py/iter_args