code: def test_csv_io(tmp_path, frame_times):
      # test the csv io on design matrices
      DM = make_first_level_design_matrix(
          frame_times,
          events=modulated_event_paradigm(),
          hrf_model="glover",
          drift_model="polynomial",
          drift_order=3,
      )
      path = tmp_path / "design_matrix.csv"
      DM.to_csv(path)
      DM2 = pd.read_csv(path, index_col=0)
  
      _, matrix, names = check_design_matrix(DM)
      _, matrix_, names_ = check_design_matrix(DM2)
      assert_almost_equal(matrix, matrix_)
      assert names == names_
  
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 22 for calling a global function with example usage: test_csv_io(tmp_path, frame_times) without return types