code: def aff2euler(affine):
      """
      Compute Euler angles from 4 x 4 `affine`
  
      Parameters
      ----------
      affine : 4 by 4 array
          An affine transformation matrix
  
      Returns
      -------
      The Euler angles associated with the affine
      """
      return euler.mat2euler(aff2rot_zooms(affine)[0])
  
file_path: nipy/nipy/algorithms/registration/scripting.py
imports: import os
  import os.path
  import nibabel
  import nibabel.eulerangles
  import numpy
  import numpy.linalg
  from nibabel.filename_parser import splitext_addext
  from nibabel.optpkg import optional_package
  import nipy.algorithms.slicetiming
  from nipy.io.api import save_image
  from .groupwise_registration import SpaceTimeRealign
label_desc: Use image node_id 1 for calling a global function with example usage: aff2euler(affine) and returns: euler