code: def assert_arr_img_res(arr_res, img_res):
      for key in (
          "volume_mean_diff2",
          "slice_mean_diff2",
          "volume_means",
      ):
          assert_array_equal(arr_res[key], img_res[key])
      for key in ("slice_diff2_max_vol", "diff2_mean_vol"):
          assert_array_almost_equal(
              arr_res[key], img_res[key].get_fdata()
          )
  
file_path: nipy/nipy/algorithms/diagnostics/tests/test_time_difference.py
imports: from os.path import dirname
  from os.path import join
  import numpy
  import pytest
  import scipy.io
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  from nipy import load_image
  from nipy.testing import funcfile
  from ....core.api import rollimg
  from ....core.reference.coordinate_map import AxisError
  from ..None import timediff
label_desc: Use image node_id 4 for calling a global function with example usage: assert_arr_img_res(arr_res, img_res) without return types