@task
def mapper(nr):
    return nr * 2

@task
def reducer(nrs):
    return sum(nrs)

@task
def double_then_sum(nrs):
    return (group([mapper.s(nr) for nr in nrs]) | reducer.s())()
ar = (get_range.s(3) | double_then_sum.s())()
ar.result.result
Celery - group inside a chain