code: def test_set_3d_backend_bad(monkeypatch, tmp_path):
      """Test that the error emitted when a bad backend name is used."""
      match = "Allowed values are 'pyvistaqt' and 'notebook'"
      with pytest.raises(ValueError, match=match):
          set_3d_backend("invalid")
  
      # gh-9607
      def fail(x):
          raise ModuleNotFoundError(x)
  
      monkeypatch.setattr(
          "mne.viz.backends.renderer._reload_backend", fail
      )
      monkeypatch.setattr(
          "mne.viz.backends.renderer.MNE_3D_BACKEND", None
      )
      match = "Could not load any valid 3D.*\npyvistaqt: .*"
      assert get_3d_backend() is None
      with pytest.raises(RuntimeError, match=match):
          _get_renderer()
  
file_path: mne-python/mne/viz/backends/tests/test_renderer.py
imports: import os
  import platform
  import sys
  import numpy
  import pytest
  from mne.utils import run_subprocess
  from mne.viz import Figure3D, get_3d_backend, set_3d_backend
  from mne.viz.backends._utils import ALLOWED_QUIVER_MODES
  from mne.viz.backends.renderer import _get_renderer
  from mne.viz.backends.tests._utils import skips_if_not_pyvistaqt
label_desc: Use image node_id 6 for calling a global function with example usage: test_set_3d_backend_bad(monkeypatch, tmp_path) without return types