code: def _user_ns_changed(self, name, old, new):
      if self.shell is not None:
          self.shell.user_ns = new
          self.shell.init_user_ns()
  
imports: import getpass
  import sys
  from IPython.core import release
  from ipython_genutils.py3compat import builtin_mod, PY3, unicode_type, safe_unicode
  from IPython.utils.tokenutil import token_at_cursor, line_at_cursor
  from traitlets import Instance, Type, Any, List, Bool
  from .comm import CommManager
  from .kernelbase import Kernel
  from .zmqshell import ZMQInteractiveShell
label_desc: Use image node_id 2 for calling the IPythonKernel obj's underlying member method code with example usage: obj._user_ns_changed(name, old, new) without return types