def require_ok(response):

    assert isinstance(response, dict), "Response is not a dict"

    assert response.get("ok") is True, (
        f"Expected ok=True\n{response}"
    )

    return response