code: def test_inv_ornt_aff():
      # Extra tests for inv_ornt_aff routines (also tested in
      # io_orientations test)
      with pytest.raises(OrientationError):
          inv_ornt_aff([[0, 1], [1, -1], [np.nan, np.nan]], (3, 4, 5))
  
file_path: nibabel/nibabel/tests/test_orientations.py
imports: import warnings
  import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from ..affines import from_matvec, to_matvec
  from ..orientations import OrientationError, aff2axcodes, apply_orientation, axcodes2ornt, flip_axis, inv_ornt_aff, io_orientation, ornt2axcodes, ornt_transform
  from ..testing import expires
label_desc: Use image node_id 8 for calling a global function with example usage: test_inv_ornt_aff() without return types