pydsl: id -> state_id, to avoid shadowing the built-in func