code: def test_design_matrix20(n_frames):
      # Test for commit 10662f7
      frame_times = np.arange(
          0, n_frames
      )  # was 127 in old version of create_cosine_drift
      events = modulated_event_paradigm()
      X, _ = design_matrix_light(
          frame_times, events, hrf_model="glover", drift_model="cosine"
      )
  
      # check that the drifts are not constant
      assert np.any(np.diff(X[:, -2]) != 0)
  
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 18 for calling a global function with example usage: test_design_matrix20(n_frames) without return types