human
Here's a good function header given the following:
I wrote the below code

    app = app_or_default(app)
    queues = ([_maybe_queue(app, queue) for queue in (source or [])] or None)
    with app.connection_or_acquire(connection, pool=False) as conn:
        producer = app.amqp.Producer(conn)
        state = State()
        def on_task(body, message):
            ret = predicate(body, message)
            if ret:
                if transform:
                    ret = transform(ret)
                if isinstance(ret, Queue):
                    maybe_declare(ret, conn.default_channel)
                    (ex, rk) = (ret.exchange.name, ret.routing_key)
                else:
                    (ex, rk) = expand_dest(ret, exchange, routing_key)
                republish(producer, message, exchange=ex, routing_key=rk)
                message.ack()
                state.filtered += 1
                if callback:
                    callback(state, body, message)
                if (limit and (state.filtered >= limit)):
                    raise StopFiltering()
        return start_filter(app, conn, on_task, consume_from=queues, **kwargs)

What's a good function header?
assistant
#Here's a good function header.

def move(predicate, connection=None, exchange=None, routing_key=None, source=None, app=None, callback=None, limit=None, transform=None, **kwargs):