gh-36543: Cleanup conditional assert
The code we remove here is a legacy assert which has no equivalent in
python 3.12. The way it's implemented uses compile time `IF` which is
deprecated in cython 3 so it's desirable to remove.
See also:
https://github.com/sagemath/sage/pull/36524#discussion_r1369530294
### :memo: Checklist
- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
URL: https://github.com/sagemath/sage/pull/36543
Reported by: Gonzalo Tornaría
Reviewer(s): Matthias Köppe, Tobias Diez