code: def test_realign4d_params():
      # Some tests for input parameters to realign4d
      R = Realign4d(IM, 3, [0, 1, 2], None)  # No slice_info - OK
      assert R.tr == 3
      # TR cannot be None
      pytest.raises(
          ValueError, Realign4d, IMS[1], None, [0, 1, 2], None
      )
      # TR cannot be zero
      pytest.raises(ValueError, Realign4d, IMS[1], 0, [0, 1, 2], None)
      # TR can be None if slice times are None
      R = Realign4d(IM, None, None)
      assert R.tr == 1
  
imports: import warnings
  import nibabel
  import numpy
  import pytest
  from nibabel import io_orientation
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  from ....None import load_image
  from ....core.image.image_spaces import make_xyz_image, xyz_affine
  from ....io.nibcompat import get_header
  from ....testing import funcfile
  from ...slicetiming.timefuncs import st_02413, st_42031, st_43210
  from ..affine import Rigid
  from ..groupwise_registration import FmriRealign4d, Image4d, Realign4d, Realign4dAlgorithm, SpaceRealign, SpaceTimeRealign, make_grid, resample4d
label_desc: Use image node_id 14 for calling a global function with example usage: test_realign4d_params() without return types