code: def compose_transformations(*mats):
      """Compose multiple 4x4 affine transformations in one 4x4 matrix
  
      Parameters
      ----------
  
      mat1 : array, (4, 4)
      mat2 : array, (4, 4)
      ...
      matN : array, (4, 4)
  
      Returns
      -------
      matN x ... x mat2 x mat1 : array, (4, 4)
  
      """
      prev = mats[0]
      if len(mats) < 2:
          raise ValueError("At least two or more matrices are needed")
  
      for mat in mats[1:]:
          prev = np.dot(mat, prev)
  
      return prev
  
imports: import itertools
  import math
  import numpy
  import numpy.linalg
label_desc: Use image node_id 18 for calling a global function with example usage: compose_transformations() and returns: prev