code: def aff2axcodes(aff, labels=None, tol=None):
      """axis direction codes for affine `aff`
  
      Parameters
      ----------
      aff : (N,M) array-like
          affine transformation matrix
      labels : optional, None or sequence of (2,) sequences
          Labels for negative and positive ends of output axes of `aff`.  See
          docstring for ``ornt2axcodes`` for more detail
      tol : None or float
          Tolerance for SVD of affine - see ``io_orientation`` for more detail.
  
      Returns
      -------
      axcodes : (N,) tuple
          labels for positive end of voxel axes.  Dropped axes get a label of
          None.
  
      Examples
      --------
      >>> aff = [[0,1,0,10],[-1,0,0,20],[0,0,1,30],[0,0,0,1]]
      >>> aff2axcodes(aff, (('L','R'),('B','F'),('D','U')))
      ('B', 'R', 'U')
      """
      ornt = io_orientation(aff, tol)
      return ornt2axcodes(ornt, labels)
  
file_path: nibabel/nibabel/orientations.py
imports: import numpy
  import numpy.linalg
  from .deprecated import deprecate_with_version
label_desc: Use image node_id 8 for calling a global function with example usage: aff2axcodes(aff, labels, tol) and returns: ornt2axcodes