code: def _product_affines(*affine_mappings, **kwargs):
      """Product of affine_mappings."""
      input_name = kwargs.pop("input_name", "product")
      output_name = kwargs.pop("output_name", "product")
      if kwargs:
          raise TypeError(f"Unexpected kwargs {kwargs}")
      if input_name is None:
          input_name = "product"
      if output_name is None:
          output_name = "product"
      ndimin = [affine.ndims[0] for affine in affine_mappings]
      ndimout = [affine.ndims[1] for affine in affine_mappings]
  
      M = np.zeros(
          (np.sum(ndimout) + 1, np.sum(ndimin) + 1),
          dtype=safe_dtype(
              *[affine.affine.dtype for affine in affine_mappings]
          ),
      )
      M[-1, -1] = 1.0
  
      # Fill in the block matrix
      product_domain = []
      product_range = []
  
      i = 0
      j = 0
  
      for l, affine in enumerate(affine_mappings):
          A, b = to_matvec(affine.affine)
          M[i : (i + ndimout[l]), j : (j + ndimin[l])] = A
          M[i : (i + ndimout[l]), -1] = b
          product_domain.extend(affine.function_domain.coord_names)
          product_range.extend(affine.function_range.coord_names)
          i += ndimout[l]
          j += ndimin[l]
  
      return AffineTransform(
          CoordinateSystem(
              product_domain, name=input_name, coord_dtype=M.dtype
          ),
          CoordinateSystem(
              product_range, name=output_name, coord_dtype=M.dtype
          ),
          M,
      )
  
imports: import warnings
  import numpy
  import numpy.linalg
  from nibabel import io_orientation
  from nibabel.affines import from_matvec, to_matvec
  from .coordinate_system import CoordinateSystem, is_coordsys, safe_dtype
  from .coordinate_system import product
label_desc: Use image node_id 14 for calling a global function with example usage: _product_affines() and returns: AffineTransform