code: def test_cifti2_voxelindicesijk():
      vi = ci.Cifti2VoxelIndicesIJK()
      with pytest.raises(ci.Cifti2HeaderError):
          vi.to_xml()
  
      vi = ci.Cifti2VoxelIndicesIJK()
      assert len(vi) == 0
  
      with pytest.raises(ci.Cifti2HeaderError):
          vi.to_xml()
      vi.extend(np.array([[0, 1, 2]]))
  
      assert len(vi) == 1
      assert vi[0] == [0, 1, 2]
      vi.append([3, 4, 5])
      assert len(vi) == 2
      vi.append([6, 7, 8])
      assert len(vi) == 3
      del vi[-1]
      assert len(vi) == 2
  
      assert vi[1] == [3, 4, 5]
      vi[1] = [3, 4, 6]
      assert vi[1] == [3, 4, 6]
      with pytest.raises(ValueError):
          vi["a"] = [1, 2, 3]
  
      with pytest.raises(TypeError):
          vi[[1, 2]] = [1, 2, 3]
  
      with pytest.raises(ValueError):
          vi[1] = [2, 3]
  
      assert vi[1, 1] == 4
  
      with pytest.raises(ValueError):
          vi[[1, 1]] = "a"
  
      assert vi[0, 1:] == [1, 2]
      vi[0, 1] = 10
      assert vi[0, 1] == 10
      vi[0, 1] = 1
  
      # test for vi[:, 0] and other slices
      with pytest.raises(NotImplementedError):
          vi[:, 0]
      with pytest.raises(NotImplementedError):
          vi[:, 0] = 0
      with pytest.raises(NotImplementedError):
          # Don't know how to use remove with slice
          del vi[:, 0]
      with pytest.raises(ValueError):
          vi[0, 0, 0]
  
      with pytest.raises(ValueError):
          vi[0, 0, 0] = 0
  
      assert (
          vi.to_xml().decode("utf-8")
          == "<VoxelIndicesIJK>0 1 2\n3 4 6</VoxelIndicesIJK>"
      )
  
      with pytest.raises(TypeError):
          ci.Cifti2VoxelIndicesIJK([0, 1])
  
      vi = ci.Cifti2VoxelIndicesIJK([[1, 2, 3]])
      assert len(vi) == 1
  
imports: import collections
  from xml.etree import ElementTree
  import numpy
  import pytest
  from nibabel import cifti2
  from nibabel.cifti2.cifti2 import Cifti2HeaderError, _float_01, _value_if_klass
  from nibabel.nifti2 import Nifti2Header
  from nibabel.tests.test_dataobj_images import TestDataobjAPI
  from nibabel.tests.test_image_api import DtypeOverrideMixin, SerializeMixin
label_desc: Use image node_id 13 for calling a global function with example usage: test_cifti2_voxelindicesijk() without return types