human
I wrote the below code

    if (not settings.DEBUG):
        return handler
    else:
        def aap_wrapper_fn(request, *args, **kwargs):
            response = handler(request, *args, **kwargs)
            if ((not request.is_ajax()) and (response['Content-Type'] == 'application/json')):
                response.content = ('<body>%s</body>' % response.content)
                response['Content-Type'] = 'text/html'
            return response
        return aap_wrapper_fn

What's a good function header?

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

def allow_api_profiling(handler):