code: def test_oblique_loading():
      # Test loading of oblique parrec files
      for par in glob(pjoin(OBLIQUE, "PARREC", "*.PAR")):
          par_root, ext = splitext(basename(par))
          # Check we can load the image
          pimg = load(par)
          assert pimg.shape == (560, 560, 1)
          # Compare against NIFTI if present
          nifti_fname = pjoin(OBLIQUE, "NIFTI", par_root + ".nii")
          nimg = top_load(nifti_fname)
          assert_almost_equal(
              nimg.affine[:3, :3], pimg.affine[:3, :3], 3
          )
          # The translation part is always off
          # The amount differs by rotation
          aff_off = pimg.affine[:3, 3] - nimg.affine[:3, 3]
          # The difference is max in the order of 0.5 voxel
          vox_sizes = voxel_sizes(nimg.affine)
          assert np.all(np.abs(aff_off / vox_sizes) <= 0.5)
          # The data is very close
          assert np.allclose(pimg.dataobj, nimg.dataobj)
  
file_path: nibabel/nibabel/tests/test_parrec_data.py
imports: import unittest
  from glob import glob
  from os.path import basename, exists
  from os.path import join
  from os.path import splitext
  import numpy
  import pytest
  from numpy.testing import assert_almost_equal
  from ..None import load
  from ..affines import voxel_sizes
  from ..parrec import load
  from .nibabel_data import get_nibabel_data, needs_nibabel_data
label_desc: Use image node_id 3 for calling a global function with example usage: test_oblique_loading() without return types