code: def test_io_egi_pns_mff(tmp_path):
      """Test importing EGI MFF with PNS data."""
      pytest.importorskip("defusedxml")
      raw = read_raw_egi(
          egi_mff_pns_fname, include=None, preload=True, verbose="error"
      )
      assert "RawMff" in repr(raw)
      pns_chans = pick_types(raw.info, ecg=True, bio=True, emg=True)
      assert len(pns_chans) == 7
      names = [raw.ch_names[x] for x in pns_chans]
      pns_names = [
          "Resp. Temperature",
          "Resp. Pressure",
          "ECG",
          "Body Position",
          "Resp. Effort Chest",
          "Resp. Effort Abdomen",
          "EMG-Leg",
      ]
      _test_raw_reader(
          read_raw_egi,
          input_fname=egi_mff_pns_fname,
          channel_naming="EEG %03d",
          verbose="error",
          test_rank="less",
          test_scaling=False,  # XXX probably some bug
      )
      assert names == pns_names
      mat_names = [
          "Resp_Temperature",
          "Resp_Pressure",
          "ECG",
          "Body_Position",
          "Resp_Effort_Chest",
          "Resp_Effort_Abdomen",
          "EMGLeg",
      ]
      egi_fname_mat = testing_path / "EGI" / "test_egi_pns.mat"
      mc = sio.loadmat(egi_fname_mat)
      for ch_name, ch_idx, mat_name in zip(
          pns_names, pns_chans, mat_names
      ):
          print(f"Testing {ch_name}")
          mc_key = [x for x in mc.keys() if mat_name in x][0]
          cal = raw.info["chs"][ch_idx]["cal"]
          mat_data = mc[mc_key] * cal
          raw_data = raw[ch_idx][0]
          assert_array_equal(mat_data, raw_data)
  
      # EEG missing
      new_mff = tmp_path / "temp.mff"
      shutil.copytree(egi_mff_pns_fname, new_mff)
      read_raw_egi(new_mff, verbose="error")
      os.remove(new_mff / "info1.xml")
      os.remove(new_mff / "signal1.bin")
      with pytest.raises(
          FileNotFoundError, match="Could not find any EEG"
      ):
          read_raw_egi(new_mff, verbose="error")
  
imports: import os
  import shutil
  from copy import deepcopy
  from datetime import datetime, timezone
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_equal
  from scipy import io
  from mne import find_events, pick_types
  from mne._fiff.constants import FIFF
  from mne.datasets.testing import data_path, requires_testing_data
  from mne.io import read_evokeds_mff, read_raw_egi, read_raw_fif
  from mne.io.egi.egi import _combine_triggers
  from mne.io.tests.test_raw import _test_raw_reader
  from mne.utils import object_diff
label_desc: Use image node_id 5 for calling a global function with example usage: test_io_egi_pns_mff(tmp_path) without return types