code: def test_unknown_format(tmp_path):
      """Test our warning about an unknown format."""
      fname = tmp_path / ricoh_path.name
      _, kit_info = get_kit_info(ricoh_path, allow_unknown_format=False)
      n_before = kit_info["dirs"][KIT.DIR_INDEX_SYSTEM]["offset"]
      with open(fname, "wb") as fout:
          with open(ricoh_path, "rb") as fin:
              fout.write(fin.read(n_before))
              version, revision = np.fromfile(fin, "<i4", 2)
              assert version > 2  # good
              version = 1  # bad
              np.array([version, revision], "<i4").tofile(fout)
              fout.write(fin.read())
      with pytest.raises(
          ValueError, match="SQD file format V1R000 is not offi"
      ):
          read_raw_kit(fname)
      # it's not actually an old file, so it actually raises an exception later
      # about an unknown datatype
      with pytest.raises(Exception):
          with pytest.warns(RuntimeWarning, match="Force loading"):
              read_raw_kit(fname, allow_unknown_format=True)
  
imports: from pathlib import Path
  import numpy
  import pytest
  import scipy.io
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal, assert_equal
  from scipy import linalg
  import mne
  from mne import Epochs, find_events, pick_types, read_events
  from mne._fiff.constants import FIFF
  from mne.datasets.testing import requires_testing_data
  from mne.io import read_epochs_kit, read_raw_fif, read_raw_kit
  from mne.io.kit.constants import KIT
  from mne.io.kit.coreg import read_sns
  from mne.io.kit.kit import get_kit_info
  from mne.io.tests.test_raw import _test_raw_reader
  from mne.surface import _get_ico_surface
  from mne.transforms import apply_trans
  from mne.utils import assert_dig_allclose
label_desc: Use image node_id 2 for calling a global function with example usage: test_unknown_format(tmp_path) without return types