human
I wrote the below code

    if available:
        return cupy.memoize(for_each_device)
    def dummy_decorator(f):
        @functools.wraps(f)
        def ret(*args, **kwargs):
            return f(*args, **kwargs)
        return ret
    return dummy_decorator

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

def memoize(for_each_device=False):