code: def get_outspace_params():
      # Return in_shape, in_aff, vox, out_shape, out_aff for output space tests
      # Put in function to use also for resample_to_output tests
      # Some affines as input to the tests
      trans_123 = [
          [1, 0, 0, 1],
          [0, 1, 0, 2],
          [0, 0, 1, 3],
          [0, 0, 0, 1],
      ]
      trans_m123 = [
          [1, 0, 0, -1],
          [0, 1, 0, -2],
          [0, 0, 1, -3],
          [0, 0, 0, 1],
      ]
      rot_3 = from_matvec(euler2mat(np.pi / 4), [0, 0, 0])
      return (  # in_shape, in_aff, vox, out_shape, out_aff
          # Identity
          ((2, 3, 4), np.eye(4), None, (2, 3, 4), np.eye(4)),
          # Flip first axis
          (
              (2, 3, 4),
              np.diag([-1, 1, 1, 1]),
              None,
              (2, 3, 4),
              [
                  [1, 0, 0, -1],  # axis reversed -> -ve offset
                  [0, 1, 0, 0],
                  [0, 0, 1, 0],
                  [0, 0, 0, 1],
              ],
          ),
          # zooms for affine > 1 -> larger grid with default 1mm output voxels
          (
              (2, 3, 4),
              np.diag([4, 5, 6, 1]),
              None,
              (5, 11, 19),
              np.eye(4),
          ),
          # set output voxels to be same size as input. back to original shape
          (
              (2, 3, 4),
              np.diag([4, 5, 6, 1]),
              (4, 5, 6),
              (2, 3, 4),
              np.diag([4, 5, 6, 1]),
          ),
          # Translation preserved in output
          ((2, 3, 4), trans_123, None, (2, 3, 4), trans_123),
          ((2, 3, 4), trans_m123, None, (2, 3, 4), trans_m123),
          # rotation around 3rd axis
          (
              (2, 3, 4),
              rot_3,
              None,
              # x diff, y diff now 3 cos pi / 4 == 2.12, ceil to 3, add 1
              # most negative x now 2 cos pi / 4
              (4, 4, 4),
              [
                  [1, 0, 0, -2 * np.cos(np.pi / 4)],
                  [0, 1, 0, 0],
                  [0, 0, 1, 0],
                  [0, 0, 0, 1],
              ],
          ),
          # Less than 3 axes
          ((2, 3), np.eye(4), None, (2, 3), np.eye(4)),
          ((2,), np.eye(4), None, (2,), np.eye(4)),
          # Number of voxel sizes matches length
          (
              (2, 3),
              np.diag([4, 5, 6, 1]),
              (4, 5),
              (2, 3),
              np.diag([4, 5, 1, 1]),
          ),
      )
  
file_path: nibabel/nibabel/tests/test_spaces.py
imports: import numpy
  import numpy.linalg
  import pytest
  from numpy.testing import assert_almost_equal
  from ..affines import apply_affine, from_matvec
  from ..eulerangles import euler2mat
  from ..nifti1 import Nifti1Image
  from ..spaces import slice2volume, vox2out_vox
label_desc: Use image node_id 2 for calling a global function with example usage: get_outspace_params() and returns: int,  int,  int,  np,  None,  int,  int,  int,  np,  int,  int,  int,  np,  None,  int,  int,  int,  list,  int,  int,  int,  np,  None,  int,  int,  int,  np,  int,  int,  int,  np,  int,  int,  int,  int,  int,  int,  np,  int,  int,  int,  trans_123,  None,  int,  int,  int,  trans_123,  int,  int,  int,  trans_m123,  None,  int,  int,  int,  trans_m123,  int,  int,  int,  rot_3,  None,  int,  int,  int,  list,  int,  int,  np,  None,  int,  int,  np,  int,  np,  None,  int,  np,  int,  int,  np,  int,  int,  int,  int,  np