code: def install():
      if _import_nni_node_failed:
          raise ImportError(
              "Import `nni_node` failed. nni is not properly installed."
          )
      _backend_config_file.parent.mkdir(parents=True, exist_ok=True)
      _backend_config_file.write_text(
          json.dumps(_backend_config_content)
      )
  
      _frontend_dst.parent.mkdir(parents=True, exist_ok=True)
  
      if jupyter_lab_major_version == "2":
          _v2_backend_config_file.parent.mkdir(
              parents=True, exist_ok=True
          )
          _v2_backend_config_file.write_text(
              json.dumps(_v2_backend_config_content)
          )
  
          if _frontend_src.is_symlink():
              linkto = os.path.realpath(_frontend_src)
              os.symlink(linkto, _frontend_dst)
          else:
              shutil.copytree(_frontend_src, _frontend_dst)
      else:
          shutil.copytree(_frontend_src, _frontend_dst)
  
file_path: nni/nni/tools/jupyter_extension/management.py
imports: import json
  from pathlib import Path
  import shutil
  import os
  from jupyter_core.paths import jupyter_config_dir, jupyter_data_dir
label_desc: Use image node_id 2 for calling a global function with example usage: install() without return types