human
I wrote the below code

    headers = (headers or {})
    def error_cmp(response_body, body):
        return (isinstance(response_body, dict) and (set(response_body.keys()) == set((list(body.keys()) + ['error']))) and all(((response_body.get(k) == v) for (k, v) in body.items())))
    assert_json_response(response, status_code, kwargs, headers, error_cmp)

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

def assert_error(response, status_code, headers=None, **kwargs):