human
I wrote the below code

    if (login_url is None):
        login_url = reverse_lazy('customer:login')
    def _check_permissions(user):
        outcome = check_permissions(user, permissions)
        if ((not outcome) and user_is_authenticated(user)):
            raise PermissionDenied
        else:
            return outcome
    return user_passes_test(_check_permissions, login_url=login_url)

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

def permissions_required(permissions, login_url=None):