Use `assert` instead of `raise`.