code: def test_backend_environment_setup(backend, monkeypatch):
      """Test set up 3d backend based on env."""
      monkeypatch.setenv("MNE_3D_BACKEND", backend)
      monkeypatch.setattr(
          "mne.viz.backends.renderer.MNE_3D_BACKEND", None
      )
      assert (
          os.environ["MNE_3D_BACKEND"] == backend
      )  # just double-check
  
      # reload the renderer to check if the 3d backend selection by
      # environment variable has been updated correctly
      from mne.viz.backends import renderer
  
      renderer.set_3d_backend(backend)
      assert renderer.MNE_3D_BACKEND == backend
      assert renderer.get_3d_backend() == backend
  
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 1 for calling a global function with example usage: test_backend_environment_setup(backend, monkeypatch) without return types