code: def _assert_sinusoid(data, t, freq, amp, msg):
      __tracebackhide__ = True
      sinusoid = np.exp(2j * np.pi * freq * t) * amp
      phase = np.angle(np.dot(data, sinusoid))
      sinusoid = np.cos(2 * np.pi * freq * t - phase) * amp
      assert_allclose(
          data, sinusoid, rtol=0.05, atol=amp * 1e-3, err_msg=msg
      )
  
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 3 for calling a global function with example usage: _assert_sinusoid(data, t, freq, amp, msg) without return types