code: def test_read_ones():
      img = nib.load(os.path.join(test_directory, "ones.dscalar.nii"))
      arr = img.get_fdata()
      axes = [img.header.get_axis(dim) for dim in range(2)]
      assert (arr == 1).all()
      assert isinstance(axes[0], cifti2_axes.ScalarAxis)
      assert len(axes[0]) == 1
      assert axes[0].name[0] == "ones"
      assert axes[0].meta[0] == {}
      check_hcp_grayordinates(axes[1])
      img = check_rewrite(arr, axes)
      check_hcp_grayordinates(img.header.get_axis(1))
  
file_path: nibabel/nibabel/cifti2/tests/test_cifti2io_axes.py
imports: import os
  import tempfile
  import numpy
  import nibabel
  from nibabel.cifti2 import cifti2, cifti2_axes
  from nibabel.tests.nibabel_data import get_nibabel_data, needs_nibabel_data
label_desc: Use image node_id 4 for calling a global function with example usage: test_read_ones() without return types