code: def check_axes(axes, img_shape, time_axis, slice_axis):
      # Check axes as expected for plot
      assert len(axes) == 4
      # First x axis is time point differences
      assert_array_equal(
          axes[0].xaxis.get_data_interval(),
          [0, img_shape[time_axis] - 2],
      )
      # Last x axis is over slices
      assert_array_equal(
          axes[-1].xaxis.get_data_interval(),
          [0, img_shape[slice_axis] - 1],
      )
  
imports: import os
  import shutil
  from os.path import dirname, isfile
  from os.path import join
  import nibabel
  import numpy
  import pytest
  from nibabel import AnalyzeImage, Nifti1Image, Nifti1Pair, Spm2AnalyzeImage
  from numpy.testing import assert_array_equal
  from nipy import load_image
  from nipy.io.nibcompat import get_header
  from nipy.io.nifti_ref import NiftiError
  from nipy.testing import funcfile
  from nipy.testing.decorators import needs_mpl_agg
  from ..commands import diagnose, parse_fname_axes, tsdiffana
  from ..timediff import time_slice_diffs_image
label_desc: Use image node_id 2 for calling a global function with example usage: check_axes(axes, img_shape, time_axis, slice_axis) without return types