human
I wrote the below code

    def check_perms(user):
        if user.has_perm(perm):
            return True
        if raise_exception:
            raise PermissionDenied
        return False
    return user_passes_test(check_perms, login_url=login_url)

What's a good function header?

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

def permission_required(perm, login_url=None, raise_exception=False):