human
Solve the following python programming problem given the following code:
def api_endpoint(fn) : 
    '
    Decorator function to mark a view as allowed to authenticate via API key.

    Decorator must be used before login_required or has_perm to set
    request.user for those decorators.
    ' 
    fn.is_api_endpoint = True 
    global endpoints 
    endpoints.append (_wrapped) 
    @ wraps (fn) 
    def _wrapped(request, * args, **kwargs) : 
        user = get_api_request_user (request) 
        if user : 
            request.is_api_request = True 
            request.user = user 
return fn (request, * args, ** kwargs) 
return _wrapped 

    
    

    Fix the buggy line: endpoints.append (_wrapped)
assistant
#Here is Python program to fix the buggy line: endpoints.

endpoints.append (fn)