code: def set_3d_backend(backend_name, verbose=None):
      """Set the 3D backend for MNE.
  
      The backend will be set as specified and operations will use
      that backend.
  
      Parameters
      ----------
      backend_name : str
          The 3d backend to select. See Notes for the capabilities of each
          backend (``'pyvistaqt'`` and ``'notebook'``).
  
          .. versionchanged:: 0.24
             The ``'pyvista'`` backend was renamed ``'pyvistaqt'``.
      %(verbose)s
  
      Returns
      -------
      old_backend_name : str | None
          The old backend that was in use.
  
      Notes
      -----
      To use PyVista, set ``backend_name`` to ``pyvistaqt`` but the value
      ``pyvista`` is still supported for backward compatibility.
  
      This table shows the capabilities of each backend ("✓" for full support,
      and "-" for partial support):
  
      .. table::
         :widths: auto
  
         +--------------------------------------+-----------+----------+
         | **3D function:**                     | pyvistaqt | notebook |
         +======================================+===========+==========+
         | :func:`plot_vector_source_estimates` | ✓         | ✓        |
         +--------------------------------------+-----------+----------+
         | :func:`plot_source_estimates`        | ✓         | ✓        |
         +--------------------------------------+-----------+----------+
         | :func:`plot_alignment`               | ✓         | ✓        |
         +--------------------------------------+-----------+----------+
         | :func:`plot_sparse_source_estimates` | ✓         | ✓        |
         +--------------------------------------+-----------+----------+
         | :func:`plot_evoked_field`            | ✓         | ✓        |
         +--------------------------------------+-----------+----------+
         | :func:`snapshot_brain_montage`       | ✓         | ✓        |
         +--------------------------------------+-----------+----------+
         | :func:`link_brains`                  | ✓         |          |
         +--------------------------------------+-----------+----------+
         +--------------------------------------+-----------+----------+
         | **Feature:**                                                |
         +--------------------------------------+-----------+----------+
         | Large data                           | ✓         | ✓        |
         +--------------------------------------+-----------+----------+
         | Opacity/transparency                 | ✓         | ✓        |
         +--------------------------------------+-----------+----------+
         | Support geometric glyph              | ✓         | ✓        |
         +--------------------------------------+-----------+----------+
         | Smooth shading                       | ✓         | ✓        |
         +--------------------------------------+-----------+----------+
         | Subplotting                          | ✓         | ✓        |
         +--------------------------------------+-----------+----------+
         | Inline plot in Jupyter Notebook      |           | ✓        |
         +--------------------------------------+-----------+----------+
         | Inline plot in JupyterLab            |           | ✓        |
         +--------------------------------------+-----------+----------+
         | Inline plot in Google Colab          |           |          |
         +--------------------------------------+-----------+----------+
         | Toolbar                              | ✓         | ✓        |
         +--------------------------------------+-----------+----------+
      """
      global MNE_3D_BACKEND
      old_backend_name = MNE_3D_BACKEND
      backend_name = _check_3d_backend_name(backend_name)
      if MNE_3D_BACKEND != backend_name:
          _reload_backend(backend_name)
          MNE_3D_BACKEND = backend_name
      return old_backend_name
  
imports: import importlib
  import time
  from contextlib import contextmanager
  from functools import partial
  import numpy
  from ...utils import _auto_weakref, _check_option, _validate_type, fill_doc, get_config, logger, verbose
  from .._3d import _get_3d_option
  from ..utils import safe_event
  from ._utils import VALID_3D_BACKENDS
label_desc: Use image node_id 5 for calling a global function with example usage: set_3d_backend(backend_name, verbose) and returns: old_backend_name