def METHOD_NAME(self) -> bool:
    """Request wants a HTML fragment for embedding (XHR or HTMX)."""
    return request.accept_mimetypes.best in (
        'text/x.fragment+html',  # HTML fragment (custom)
        'application/x.html+json',  # HTML fragment in a JSON wrapper (custom)
    ) or (
        request.accept_mimetypes.best
        in (
            None,  # No Accept header
            '*/*',  # Default for jQuery and HTMX requests
            'text/html',  # HTML mimetype
            'text/x.embed+html',  # HTML fragment
            'application/x.html+json',  # Custom mimetype for Funnel
        )
        and (
            request.environ.get('HTTP_HX_REQUEST', '') == 'true'
            or request.environ.get('HTTP_X_REQUESTED_WITH', '').lower()
            == 'xmlhttprequest'
        )
    )