def parallel(pool_size=None):
    called_without_args = type(pool_size) == types.FunctionType

    def real_decorator(func):
        @wraps(func)
        def inner(*args, **kwargs):
            # Required for ssh/PyCrypto to be happy in multiprocessing
            # (as far as we can tell, this is needed even with the extra such
            # calls in newer versions of paramiko.)
            Random.atfork()
            return func(*args, **kwargs)
        inner.parallel = True
        inner.serial = False
        inner.pool_size = None if called_without_args else pool_size
        return _wrap_as_new(func, inner)

    # Allow non-factory-style decorator use (@decorator vs @decorator())
    if called_without_args:
        return real_decorator(pool_size)

    return real_decorator
Forces the wrapped function to run in parallel, instead of sequentially.
dataset/ETHPy150Open fabric/fabric/fabric/decorators.py/parallel