code: def test_validate_if_list_of_axes():
      """Test validation of axes."""
      fig, ax = plt.subplots(2, 2)
      pytest.raises(ValueError, _validate_if_list_of_axes, ax)
      ax_flat = ax.ravel()
      ax = ax.ravel().tolist()
      _validate_if_list_of_axes(ax_flat)
      _validate_if_list_of_axes(ax_flat, 4)
      pytest.raises(ValueError, _validate_if_list_of_axes, ax_flat, 5)
      pytest.raises(ValueError, _validate_if_list_of_axes, ax, 3)
      pytest.raises(TypeError, _validate_if_list_of_axes, "error")
      pytest.raises(TypeError, _validate_if_list_of_axes, ["error"] * 2)
      pytest.raises(TypeError, _validate_if_list_of_axes, ax[0])
      pytest.raises(ValueError, _validate_if_list_of_axes, ax, 3)
      ax_flat[2] = 23
      pytest.raises(TypeError, _validate_if_list_of_axes, ax_flat)
      _validate_if_list_of_axes(ax, 4)
      plt.close("all")
  
imports: from pathlib import Path
  import matplotlib.pyplot
  import numpy
  import pytest
  from numpy.testing import assert_allclose
  from mne import read_evokeds
  from mne.epochs import Epochs
  from mne.event import read_events
  from mne.io import read_raw_fif
  from mne.viz import ClickableImage, add_background_image, mne_analyze_colormap
  from mne.viz.ui_events import ColormapRange, link, subscribe
  from mne.viz.utils import _compute_scalings, _fake_click, _fake_keypress, _fake_scroll, _get_color_list, _make_event_color_dict, _setup_vmin_vmax, _validate_if_list_of_axes, centers_to_edges, compare_fiff, concatenate_images
label_desc: Use image node_id 8 for calling a global function with example usage: test_validate_if_list_of_axes() without return types