code: def _get_3d_backend():
      """Load and return the current 3d backend."""
      global MNE_3D_BACKEND
      if MNE_3D_BACKEND is None:
          MNE_3D_BACKEND = get_config(
              key="MNE_3D_BACKEND", default=None
          )
          if MNE_3D_BACKEND is None:  # try them in order
              errors = dict()
              for name in VALID_3D_BACKENDS:
                  try:
                      _reload_backend(name)
                  except ImportError as exc:
                      errors[name] = str(exc)
                  else:
                      MNE_3D_BACKEND = name
                      break
              else:
                  raise RuntimeError(
                      "Could not load any valid 3D backend\n"
                      + "\n".join(
                          f"{key}: {val}" for key, val in errors.items()
                      )
                      + "\n".join(
                          (
                              "\n\n install pyvistaqt, using pip or conda:",
                              "'pip install pyvistaqt'",
                              "'conda install -c conda-forge pyvistaqt'",
                              "\n or install ipywidgets, "
                              + "if using a notebook backend",
                              "'pip install ipywidgets'",
                              "'conda install -c conda-forge ipywidgets'",
                          )
                      )
                  )
  
          else:
              MNE_3D_BACKEND = _check_3d_backend_name(MNE_3D_BACKEND)
              _reload_backend(MNE_3D_BACKEND)
      MNE_3D_BACKEND = _check_3d_backend_name(MNE_3D_BACKEND)
      return MNE_3D_BACKEND
  
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 7 for calling a global function with example usage: _get_3d_backend() and returns: MNE_3D_BACKEND