code: def test_coreg_gui_scraper(tmp_path, renderer_interactive_pyvistaqt):
      """Test the scrapper for the coregistration GUI."""
      pytest.importorskip("sphinx_gallery")
      from mne.gui import coregistration
  
      coreg = coregistration(
          subject="sample", subjects_dir=subjects_dir, trans=fname_trans
      )
      (tmp_path / "_images").mkdir()
      image_path = tmp_path / "_images" / "temp.png"
      gallery_conf = dict(builder_name="html", src_dir=tmp_path)
      block_vars = dict(
          example_globals=dict(gui=coreg),
          image_path_iterator=iter([str(image_path)]),
      )
      assert not image_path.is_file()
      assert not getattr(coreg, "_scraped", False)
      mne.gui._GUIScraper()(None, block_vars, gallery_conf)
      assert image_path.is_file()
      assert coreg._scraped
  
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 4 for calling a global function with example usage: test_coreg_gui_scraper(tmp_path, renderer_interactive_pyvistaqt) without return types