code: def test_persyst_moved_file(tmp_path):
      """Test reader - Persyst files need to be in same directory."""
      new_fname_lay = tmp_path / fname_lay.name
      new_fname_dat = tmp_path / fname_dat.name
      shutil.copy(fname_lay, new_fname_lay)
  
      # original file read should work
      read_raw_persyst(fname_lay)
  
      # without a .dat file, reader should break
      # when the lay file was moved
      desired_err_msg = (
          "The data path you specified does "
          "not exist for the lay path, "
          "sub-pt1_ses-02_task-monitor_acq-ecog_run-01_clip2.lay"
      )
      with pytest.raises(FileNotFoundError, match=desired_err_msg):
          read_raw_persyst(new_fname_lay, preload=True)
  
      # now change the file contents to point
      # to the full path, but it should still not work
      # as reader requires lay and dat file to be in
      # same directory
      with open(fname_lay) as fin:
          with open(new_fname_lay, "w") as fout:
              # for each line in the input file
              for idx, line in enumerate(fin):
                  if line.startswith("File="):
                      # give it the full path to the old data
                      test_fpath = fname_dat.parent / line.split("=")[1]
                      line = f"File={test_fpath}\n"
                  fout.write(line)
      with pytest.raises(FileNotFoundError, match=desired_err_msg):
          read_raw_persyst(new_fname_lay, preload=True)
  
      # once we copy the dat file to the same directory, reader
      # should work
      shutil.copy(fname_dat, new_fname_dat)
      read_raw_persyst(new_fname_lay, preload=True)
  
file_path: mne-python/mne/io/persyst/tests/test_persyst.py
imports: import os
  import shutil
  import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from mne.datasets.testing import data_path, requires_testing_data
  from mne.io import read_raw_persyst
  from mne.io.tests.test_raw import _test_raw_reader
label_desc: Use image node_id 5 for calling a global function with example usage: test_persyst_moved_file(tmp_path) without return types