code: def test_show_design_matrix(tmp_path):
      # test that the show code indeed (formally) runs
      frame_times = np.linspace(0, 127 * 1.0, 128)
      dmtx = make_first_level_design_matrix(
          frame_times, drift_model="polynomial", drift_order=3
      )
      ax = plot_design_matrix(dmtx)
      assert ax is not None
  
      ax = plot_design_matrix(dmtx, output_file=tmp_path / "dmtx.png")
      assert (tmp_path / "dmtx.png").exists()
      assert ax is None
      plot_design_matrix(dmtx, output_file=tmp_path / "dmtx.pdf")
      assert (tmp_path / "dmtx.pdf").exists()
  
imports: import matplotlib
  import matplotlib.pyplot
  import numpy
  import pandas
  import pytest
  from numpy.testing import assert_array_equal
  from nilearn.glm.first_level.design_matrix import make_first_level_design_matrix
  from nilearn.glm.tests._testing import design_with_null_durations
  from nilearn.plotting.matrix_plotting import pad_contrast_matrix, plot_contrast_matrix, plot_design_matrix, plot_event, plot_matrix
label_desc: Use image node_id 16 for calling a global function with example usage: test_show_design_matrix(tmp_path) without return types