def _ensure_html_header(response):<EOL>
content_type = response.headers.get("<STR_LIT:Content-Type>", "<STR_LIT>")<EOL>if not content_type.lower().startswith("<STR_LIT>"):<EOL><INDENT>raise _NotHTML(content_type, response.request.method)<EOL><DEDENT>
Check the Content-Type header to ensure the response contains HTML.

    Raises `_NotHTML` if the content type is not text/html.