human
I wrote the below code

    decorator = cached_query(model, filter_fn)
    def migrating_cached_query_decorator(fn):
        wrapped = decorator(fn)
        def migrating_cached_query_wrapper(*args):
            new_query = wrapped(*args)
            old_query = make_results(new_query.query, filter_fn)
            old_query.new_query = new_query
            return old_query
        return migrating_cached_query_wrapper
    return migrating_cached_query_decorator

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

def migrating_cached_query(model, filter_fn=filter_identity):