human
I wrote the below code

    def wrapper(func):
        memoized_func = memoized(func)
        @functools.wraps(func)
        def wrapped(*args, **kwargs):
            args = list(args)
            request = args.pop(request_index)
            args.insert(request_index, request_func(request))
            return memoized_func(*args, **kwargs)
        return wrapped
    return wrapper

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

def memoized_with_request(request_func, request_index=0):