I think you should use `ip.user_ns` instead of `locals()`, no?