We should replace all assertions with exceptions (probably `RuntimeError`). Assertions will not fire if Python was invoked with `-O`.
We should replace all assertions with exceptions (probably
RuntimeError). Assertions will not fire if Python was invoked with-O.