code: def test_no_sparse_head(
      subjects_dir_tmp, renderer_interactive_pyvistaqt, monkeypatch
  ):
      """Test mne.gui.coregistration with no sparse head."""
      from mne.gui import coregistration
  
      subjects_dir_tmp = Path(subjects_dir_tmp)
      subject = "sample"
      out_rr, out_tris = mne.read_surface(
          subjects_dir_tmp / subject / "bem" / "outer_skin.surf"
      )
      for head in ("sample-head.fif", "outer_skin.surf"):
          os.remove(subjects_dir_tmp / subject / "bem" / head)
      # Avoid actually doing the decimation (it's slow)
      monkeypatch.setattr(
          mne.coreg,
          "decimate_surface",
          lambda rr, tris, n_triangles: (out_rr, out_tris),
      )
      with pytest.warns(
          RuntimeWarning, match="No low-resolution head found"
      ):
          coreg = coregistration(
              inst=raw_path,
              subject=subject,
              subjects_dir=subjects_dir_tmp,
          )
      coreg.close()
  
imports: import os
  from contextlib import nullcontext
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose
  import mne
  from mne._fiff.constants import FIFF
  from mne.channels import DigMontage
  from mne.coreg import Coregistration
  from mne.datasets import testing
  from mne.io import read_info
  from mne.io.kit.tests import data_dir
  from mne.utils import catch_logging, get_config
  from mne.viz import _3d
label_desc: Use image node_id 6 for calling a global function with example usage: test_no_sparse_head(subjects_dir_tmp, renderer_interactive_pyvistaqt, monkeypatch) without return types