code: def test_aff2axcodes():
      assert aff2axcodes(np.eye(4)) == tuple("RAS")
      aff = [[0, 1, 0, 10], [-1, 0, 0, 20], [0, 0, 1, 30], [0, 0, 0, 1]]
      assert aff2axcodes(aff, (("L", "R"), ("B", "F"), ("D", "U"))) == (
          "B",
          "R",
          "U",
      )
      assert aff2axcodes(aff, (("L", "R"), ("B", "F"), ("D", "U"))) == (
          "B",
          "R",
          "U",
      )
  
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 7 for calling a global function with example usage: test_aff2axcodes() without return types