Extract private method _assert_never_called.