code: def test_compute_proj_exg(tmp_path, fun):
      """Test mne compute_proj_ecg/eog."""
      check_usage(fun)
      tempdir = str(tmp_path)
      use_fname = op.join(tempdir, op.basename(raw_fname))
      bad_fname = op.join(tempdir, "bads.txt")
      with open(bad_fname, "w") as fid:
          fid.write("MEG 2443\n")
      shutil.copyfile(raw_fname, use_fname)
      with ArgvSetter(
          ("-i", use_fname, "--bad=" + bad_fname, "--rej-eeg", "150")
      ):
          with _record_warnings():  # samples, sometimes
              fun.run()
      fnames = glob.glob(op.join(tempdir, "*proj.fif"))
      assert len(fnames) == 1
      fnames = glob.glob(op.join(tempdir, "*-eve.fif"))
      assert len(fnames) == 1
  
imports: import glob
  import os
  import shutil
  from os import path
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_equal
  import mne
  from mne import concatenate_raws, read_bem_solution, read_bem_surfaces, read_source_spaces, read_surface
  from mne.bem import ConductorModel, convert_flash_mris
  from mne.commands import mne_anonymize, mne_browse_raw, mne_bti2fiff, mne_clean_eog_ecg, mne_compare_fiff, mne_compute_proj_ecg, mne_compute_proj_eog, mne_coreg, mne_flash_bem, mne_kit2fiff, mne_make_scalp_surfaces, mne_prepare_bem_model, mne_report, mne_setup_forward_model, mne_setup_source_space, mne_show_fiff, mne_show_info, mne_surf2bem, mne_sys_info, mne_watershed_bem, mne_what
  from mne.datasets import testing
  from mne.io import read_info, read_raw_fif, show_fiff
  from mne.utils import ArgvSetter, _record_warnings, _stamp_to_dt, requires_freesurfer, requires_mne
label_desc: Use image node_id 8 for calling a global function with example usage: test_compute_proj_exg(tmp_path, fun) without return types