It's not a valid production for 'atom' in the grammar[1].
Here, the production is func_body_suite → stmt+ → (stmt, stmt) → (simple_stmt, simple_stmt) → (small_stmt, small_stmt) → (global_stmt, nonlocal_stmt) ; syntactically, I'm inclided to agree that the code sample seems valid. (It is, of course, semantically malformed.)
I suspect that there just never was a separate exception type for this sort of thing.