human
I wrote the below code

    @wraps(func)
    def new_func(*args, **kw):
        'Executes    ``func(*args,    **kw)``    only    after    checking    for    the\n                                correct    JSON    API    :http:header:`Accept`    header.\n\n                                '
        header = request.headers.get('Accept')
        if (header is None):
            return func(*args, **kw)
        header_pairs = list(parse_accept_header(header))
        if (len(header_pairs) == 0):
            return func(*args, **kw)
        if any(((name == '*/*') for (name, extra) in header_pairs)):
            return func(*args, **kw)
        jsonapi_pairs = [(name, extra) for (name, extra) in header_pairs if name.startswith(JSONAPI_MIMETYPE)]
        if (len(jsonapi_pairs) == 0):
            detail = 'Accept    header,    if    specified,    must    be    the    JSON    API    media    type:    application/vnd.api+json'
            return error_response(406, detail=detail)
        if all(((extra is not None) for (name, extra) in jsonapi_pairs)):
            detail = 'Accept    header    contained    JSON    API    content    type,    but    each    instance    occurred    with    media    type    parameters.
   at    least    one    instance    must    appear    without    parameters    (the    part    after    the    semicolon)'
            return error_response(406, detail=detail)
        return func(*args, **kw)
    return new_func

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

def requires_json_api_accept(func):