code: def test_matrix_plotting_set_title(mat, labels, title):
      ax = plot_matrix(mat, labels=labels, title=title)
      nb_txt = 0 if title is None else len(title)
      assert len(ax._axes.title.get_text()) == nb_txt
      if title is not None:
          assert ax._axes.title.get_text() == title
      plt.close()
  
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 13 for calling a global function with example usage: test_matrix_plotting_set_title(mat, labels, title) without return types