code: def test_pad_contrast_matrix(tmp_path):
      """Test for contrasts padding before plotting.
  
      See https://github.com/nilearn/nilearn/issues/4211
      """
      frame_times = np.linspace(0, 127 * 1.0, 128)
      dmtx = make_first_level_design_matrix(
          frame_times, drift_model="polynomial", drift_order=3
      )
      contrast = np.array([[1, -1]])
      padded_contrast = pad_contrast_matrix(contrast, dmtx)
      assert_array_equal(padded_contrast, np.array([[1, -1, 0, 0]]))
  
      contrast = np.eye(3)
      padded_contrast = pad_contrast_matrix(contrast, dmtx)
      assert_array_equal(
          padded_contrast,
          np.array(
              [
                  [1, 0, 0, 0],
                  [0, 1, 0, 0],
                  [0, 0, 1, 0],
              ]
          ),
      )
  
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 19 for calling a global function with example usage: test_pad_contrast_matrix(tmp_path) without return types