code: def test_reference_info_validity():
      assert_(
          not is_affine_valid(np.eye(3)), msg="3x3 affine is invalid"
      )
      assert_(
          not is_affine_valid(np.zeros((4, 4))),
          msg="All zeroes affine is invalid",
      )
      assert_(
          is_affine_valid(np.eye(4)), msg="Identity should be valid"
      )
  
      assert_(
          not is_dimensions_valid([0, 0]),
          msg="Dimensions of the wrong length",
      )
      assert_(
          not is_dimensions_valid([1, 1.0, 1]),
          msg="Dimensions cannot be float",
      )
      assert_(
          not is_dimensions_valid([1, -1, 1]),
          msg="Dimensions cannot be negative",
      )
      assert_(
          is_dimensions_valid([1, 1, 1]),
          msg="Dimensions of [1,1,1] should be valid",
      )
  
      assert_(
          not is_voxel_sizes_valid([0, 0]),
          msg="Voxel sizes of the wrong length",
      )
      assert_(
          not is_voxel_sizes_valid([1, -1, 1]),
          msg="Voxel sizes cannot be negative",
      )
      assert_(
          is_voxel_sizes_valid([1.0, 1.0, 1.0]),
          msg="Voxel sizes of [1.0,1.0,1.0] should be valid",
      )
  
      assert_(
          not is_voxel_order_valid("RA"),
          msg="Voxel order of the wrong length",
      )
      assert_(
          not is_voxel_order_valid(["RAS"]),
          msg="List of string is not a valid voxel order",
      )
      assert_(
          not is_voxel_order_valid(["R", "A", "Z"]),
          msg="Invalid value for voxel order (Z)",
      )
      assert_(
          not is_voxel_order_valid("RAZ"),
          msg="Invalid value for voxel order (Z)",
      )
      assert_(
          is_voxel_order_valid("RAS"),
          msg="RAS should be a valid voxel order",
      )
      assert_(
          is_voxel_order_valid(["R", "A", "S"]),
          msg="RAS should be a valid voxel order",
      )
  
imports: import tempfile
  from urllib.error import URLError, HTTPError
  import pytest
  import nibabel
  import numpy
  from numpy.testing import assert_allclose, assert_array_equal, assert_
  import trx.trx_file_memmap
  from dipy.data import get_fnames
  from dipy.io.streamline import load_tractogram
  from dipy.io.utils import create_nifti_header, decfa, decfa_to_float, get_reference_info, is_reference_info_valid, read_img_arr_or_path
  from dipy.testing.decorators import set_random_number_generator
label_desc: Use image node_id 8 for calling a global function with example usage: test_reference_info_validity() without return types