code: def install_extensions(enable=True, user=False):
      """Register ipyparallel clusters tab as notebook extensions
  
      Toggle with enable=True/False.
      """
      import notebook
  
      from ipyparallel.util import _v
  
      if _v(notebook.__version__) < _v("4.2"):
          return _install_extension_nb41(enable)
  
      from notebook.nbextensions import (
          disable_nbextension,
          enable_nbextension,
          install_nbextension_python,
      )
      from notebook.serverextensions import (
          toggle_serverextension_python,
      )
  
      toggle_serverextension_python("ipyparallel", user=user)
      install_nbextension_python("ipyparallel", user=user)
      if enable:
          enable_nbextension("tree", "ipyparallel/main", user=user)
      else:
          disable_nbextension("tree", "ipyparallel/main")
  
imports: from jupyter_core.paths import jupyter_config_dir
  from notebook.services.config import ConfigManager
  from traitlets.config.manager import BaseJSONConfigManager
label_desc: Use image node_id 1 for calling a global function with example usage: install_extensions(enable, user) and returns: _install_extension_nb41