code: def test_read_raw_curry_rfDC(fname, tol, mock_dev_head_t, tmp_path):
      """Test reading CURRY files."""
      if mock_dev_head_t:
          if "Curry 7" in fname.name:  # not supported yet
              return
          # copy files to tmp_path
          for ext in (".cdt", ".cdt.dpa"):
              src = fname.with_suffix(ext)
              dst = tmp_path / fname.with_suffix(ext).name
              copyfile(src, dst)
              if ext == ".cdt.dpa":
                  with open(dst, "a") as fid:
                      fid.write(LM_CONTENT)
          fname = tmp_path / fname.name
          with open(
              fname.with_suffix(fname.suffix + ".hpi"), "w"
          ) as fid:
              fid.write(HPI_CONTENT)
  
      # check data
      bti_rfDC = read_raw_bti(
          pdf_fname=bti_rfDC_file, head_shape_fname=None
      )
      with catch_logging() as log:
          raw = read_raw_curry(fname, verbose=True)
      log = log.getvalue()
      if mock_dev_head_t:
          assert "Composing device" in log
      else:
          assert "Leaving device" in log
          assert "no landmark" in log
  
      # test on the eeg chans, since these were not renamed by curry
      eeg_names = [
          ch["ch_name"]
          for ch in raw.info["chs"]
          if ch["kind"] == FIFF.FIFFV_EEG_CH
      ]
  
      assert_allclose(
          raw.get_data(eeg_names),
          bti_rfDC.get_data(eeg_names),
          rtol=tol,
      )
      assert (
          bti_rfDC.info["dev_head_t"] is not None
      )  # XXX probably a BTI bug
      if mock_dev_head_t:
          assert raw.info["dev_head_t"] is not None
          assert_allclose(
              raw.info["dev_head_t"]["trans"], WANT_TRANS, atol=1e-5
          )
      else:
          assert raw.info["dev_head_t"] is None
  
      # check that most MEG sensors are approximately oriented outward from
      # the device origin
      n_meg = n_eeg = n_other = 0
      pos = list()
      nn = list()
      for ch in raw.info["chs"]:
          if ch["kind"] == FIFF.FIFFV_MEG_CH:
              assert ch["coil_type"] == FIFF.FIFFV_COIL_CTF_GRAD
              t = _loc_to_coil_trans(ch["loc"])
              pos.append(t[:3, 3])
              nn.append(t[:3, 2])
              assert_allclose(np.linalg.norm(nn[-1]), 1.0)
              n_meg += 1
          elif ch["kind"] == FIFF.FIFFV_EEG_CH:
              assert ch["coil_type"] == FIFF.FIFFV_COIL_EEG
              n_eeg += 1
          else:
              assert ch["coil_type"] == FIFF.FIFFV_COIL_NONE
              n_other += 1
      assert n_meg == 148
      assert n_eeg == 31
      assert n_other == 15
      pos = np.array(pos)
      nn = np.array(nn)
      rad, origin = _fit_sphere(pos, disp=False)
      assert 0.11 < rad < 0.13
      pos -= origin
      pos /= np.linalg.norm(pos, axis=1, keepdims=True)
      angles = np.abs(np.rad2deg(np.arccos((pos * nn).sum(-1))))
      assert (angles < 20).sum() > 100
  
imports: from datetime import datetime, timezone
  from pathlib import Path
  from shutil import copyfile
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_equal
  from mne._fiff.constants import FIFF
  from mne._fiff.tag import _loc_to_coil_trans
  from mne.annotations import events_from_annotations, read_annotations
  from mne.bem import _fit_sphere
  from mne.datasets import testing
  from mne.event import find_events
  from mne.io.bti import read_raw_bti
  from mne.io.curry import read_raw_curry
  from mne.io.curry.curry import FILE_EXTENSIONS, _get_curry_file_structure, _get_curry_version, _read_events_curry
  from mne.io.edf import read_raw_bdf
  from mne.io.tests.test_raw import _test_raw_reader
  from mne.utils import catch_logging
label_desc: Use image node_id 4 for calling a global function with example usage: test_read_raw_curry_rfDC(fname, tol, mock_dev_head_t, tmp_path) without return types