code: def register_sparse_backend(backend_name):
      """Registers a new backend by importing the corresponding module
          and adding the correspond `Backend` class in Backend._LOADED_BACKEND
          under the key `backend_name`
  
      Parameters
      ----------
      backend_name : str, name of the backend to load
  
      Raises
      ------
      ValueError
          If `backend_name` does not correspond to one listed
              in `_KNOWN_BACKEND`
      """
  
      if backend_name in _KNOWN_BACKENDS:
          module = importlib.import_module(
              f"tensorly.contrib.sparse.backend.{backend_name}_backend"
          )
          backend = getattr(module, _KNOWN_BACKENDS[backend_name])()
          _LOADED_BACKENDS[backend_name] = backend
      else:
          msg = (
              f"Unknown backend name {backend_name!r}, known backends are [",
              ".join(map(repr, _KNOWN_BACKENDS))]",
          )
          raise ValueError(msg)
  
file_path: tensorly/tensorly/contrib/sparse/backend/__init__.py
imports: import importlib
  from contextlib import contextmanager
  import functools
  from ....backend import backend_context, get_backend
  from ....None import backend, base, cp_tensor, tucker_tensor, tt_tensor
label_desc: Use image node_id 2 for calling a global function with example usage: register_sparse_backend(backend_name) without return types