code: def test_cosine_drift():
      # add something so that when the tests are launched
      # from a different directory
      spm_drifts = DESIGN_MATRIX["cosbf_dt_1_nt_20_hcut_0p1"]
      frame_times = np.arange(20)
      high_pass_frequency = 0.1
      nilearn_drifts = create_cosine_drift(
          high_pass_frequency, frame_times
      )
      assert_almost_equal(spm_drifts[:, 1:], nilearn_drifts[:, :-2])
  
imports: from os import path
  import numpy
  import pandas
  import pytest
  from numpy.testing import assert_almost_equal, assert_array_almost_equal, assert_array_equal
  from nilearn._utils.data_gen import basic_paradigm
  from nilearn.glm.first_level.design_matrix import _convolve_regressors, check_design_matrix, create_cosine_drift, make_first_level_design_matrix, make_second_level_design_matrix
  from ._testing import block_paradigm, design_with_negative_onsets, modulated_block_paradigm, modulated_event_paradigm, spm_paradigm
label_desc: Use image node_id 4 for calling a global function with example usage: test_cosine_drift() without return types