def mutator_stage(func):

    def coro(*args):
        task = None
        while True:
            task = yield task
            func(*(args + (task,)))
    return coro
Decorate a function that manipulates items in a coroutine to
dataset/ETHPy150Open beetbox/beets/beets/util/pipeline.py/mutator_stage