code: def test_screen_slice_axis():
      img = ni.load_image(funcfile)
      # Default screen raises a FutureWarning because of the default slice_axis
      exp_res = screen(img, slice_axis="k")
      with catch_warnings():
          simplefilter("error")
          pytest.raises(FutureWarning, screen, img)
          pytest.raises(FutureWarning, screen, img, slice_axis=None)
          explicit_img = img.renamed_axes(k="slice")
          # Now the analysis works without warning
          res = screen(explicit_img)
          # And is the expected analysis
          # Very oddly on scipy 0.9 32 bit - at least - results differ between
          # runs, so we need assert_almost_equal
          assert_almost_equal(
              pca_pos(res["pca"].get_fdata()),
              pca_pos(exp_res["pca"].get_fdata()),
          )
          assert_array_equal(
              res["ts_res"]["slice_mean_diff2"],
              exp_res["ts_res"]["slice_mean_diff2"],
          )
          # Turn off warnings, also get expected analysis
          simplefilter("ignore")
          res = screen(img)
          assert_array_equal(
              res["ts_res"]["slice_mean_diff2"],
              exp_res["ts_res"]["slice_mean_diff2"],
          )
  
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 5 for calling a global function with example usage: test_screen_slice_axis() without return types