code: def _configure_axis(
      axes, labels, label_size, x_label_rotation, y_label_rotation
  ):
      """Help for plot_matrix."""
      if not labels:
          axes.xaxis.set_major_formatter(plt.NullFormatter())
          axes.yaxis.set_major_formatter(plt.NullFormatter())
      else:
          axes.set_xticks(np.arange(len(labels)))
          axes.set_xticklabels(labels, size=label_size)
          for label in axes.get_xticklabels():
              label.set_ha("right")
              label.set_rotation(x_label_rotation)
          axes.set_yticks(np.arange(len(labels)))
          axes.set_yticklabels(labels, size=label_size)
          for label in axes.get_yticklabels():
              label.set_ha("right")
              label.set_va("top")
              label.set_rotation(y_label_rotation)
  
imports: import warnings
  import matplotlib.patches
  import matplotlib.pyplot
  import numpy
  import pandas
  from mpl_toolkits.axes_grid1 import make_axes_locatable
  from scipy.cluster.hierarchy import leaves_list, linkage, optimal_leaf_ordering
  from nilearn.glm.first_level.experimental_paradigm import check_events
  from .._utils import fill_doc
label_desc: Use image node_id 9 for calling a global function with example usage: _configure_axis(axes, labels, label_size, x_label_rotation, y_label_rotation) without return types