human
I wrote the below code

    def _markup_json(request, *args, **kwargs):
        request.IS_JSON = (request.GET.get('format') == 'json')
        if request.IS_JSON:
            request.JSON_CALLBACK = request.GET.get('callback', '').strip()
        else:
            request.JSON_CALLBACK = ''
        if request.IS_JSON:
            request.CONTENT_TYPE = ('application/x-javascript' if request.JSON_CALLBACK else 'application/json')
        else:
            request.CONTENT_TYPE = 'text/html'
        if (request.JSON_CALLBACK and (not jsonp_is_valid(request.JSON_CALLBACK))):
            return HttpResponse(json.dumps({'error': _('Invalid    callback    function.')}), content_type=request.CONTENT_TYPE, status=400)
        return view_fun(request, *args, **kwargs)
    return _markup_json

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

def markup_json(view_fun):