Build a PyErr for a failed AST-node conversion, carrying the node’s source
position so the error can be reported against the user’s Python code
instead of panicking with an internal dump.
Build an identifier for generated code from a Python name, escaping Rust
keywords so identifiers like type, match, or move don’t produce
invalid Rust. Keywords that cannot be raw identifiers (self, Self,
super, crate) get a trailing underscore instead — except self,
which is left as-is so method receivers keep working.