def threadpool(num_workers=None):
    """Apply stutils.mapreduce.map to the given function"""
    def decorator(func):
        @functools.wraps(func)
        def wrapper(data):
            return mapreduce.map(func, data, num_workers)
        return wrapper
    return decorator