code: def test_coreg_gui_pyvista_file_support(
      inst_path, tmp_path, renderer_interactive_pyvistaqt
  ):
      """Test reading supported files."""
      from mne.gui import coregistration
  
      if Path(inst_path).suffix == ".snirf":
          pytest.importorskip("snirf")
  
      if inst_path == "gen_montage":
          # generate a montage fig to use as inst.
          tmp_info = read_info(raw_path)
          eeg_chans = []
          for pt in tmp_info["dig"]:
              if pt["kind"] == FIFF.FIFFV_POINT_EEG:
                  eeg_chans.append(f"EEG {pt['ident']:03d}")
  
          dig = DigMontage(dig=tmp_info["dig"], ch_names=eeg_chans)
          inst_path = tmp_path / "tmp-dig.fif"
          dig.save(inst_path)
  
      if inst_path == ctf_raw_path:
          ctx = pytest.warns(
              RuntimeWarning, match="MEG ref channel RMSP"
          )
      elif (
          inst_path == snirf_nirsport2_raw_path
      ):  # TODO: This is maybe a bug?
          ctx = pytest.warns(RuntimeWarning, match='assuming "head"')
      else:
          ctx = nullcontext()
      with ctx:
          coreg = coregistration(
              inst=inst_path,
              subject="sample",
              subjects_dir=subjects_dir,
          )
      coreg._accept_close_event = True
      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 1 for calling a global function with example usage: test_coreg_gui_pyvista_file_support(inst_path, tmp_path, renderer_interactive_pyvistaqt) without return types