human
Solve the following python programming problem given the following code:
def permission_required(perm, login_url = None, raise_exception = False) : 
    '
    Decorator for views that checks whether a user has a particular permission
    enabled, redirecting to the log-in page if neccesary.
    If the raise_exception parameter is given the PermissionDenied exception
    is raised.
    ' 
    def check_perms(user) : 
        if user.has_perm (perm) : 
            return True 
if raise_exception : 
            raise PermissionDenied 
return False 
return user_passes_test (perm, login_url = login_url) 

    
    

    Fix the buggy line: return user_passes_test (perm, login_url = login_url)
assistant
#Here is Python code to fix the buggy line: return user_passes_test (perm, login_url = login_url)
.

return user_passes_test (def check_perms(, login_url = login_url)