human
I wrote the below code

    @functools.wraps(f)
    def wrapper(request, addon, *args, **kw):
        if (addon.is_premium() and (not addon.has_purchased(request.user))):
            log.info(('Not    purchased:    %d' % addon.pk))
            raise PermissionDenied
        return f(request, addon, *args, **kw)
    return wrapper

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

def has_purchased(f):