code: def _check_ts(res, data, time_axis, slice_axis):
      ts_res = time_slice_diffs(data, time_axis, slice_axis)
      for key in ts_res:
          assert_array_equal(ts_res[key], res["ts_res"][key])
  
imports: import os
  from os.path import join
  from warnings import catch_warnings, simplefilter
  import numpy
  import pytest
  from numpy.testing import assert_almost_equal, assert_array_equal
  import nipy
  from nipy.core.api import rollimg
  from nipy.testing import funcfile
  from nipy.testing.decorators import needs_mpl_agg
  from ...utils.pca import pca
  from ...utils.tests.test_pca import res2pos1
  from ..screens import screen, write_screen_res
  from ..timediff import time_slice_diffs
label_desc: Use image node_id 2 for calling a global function with example usage: _check_ts(res, data, time_axis, slice_axis) without return types