code: def subgrid_affine(affine, slices):
      """Return dot prodoct of `affine` and affine resulting from `slices`
  
      Parameters
      ----------
      affine : array-like
          Affine to apply on right of affine resulting from `slices`
      slices : sequence of slice objects
          Slices generating (N+1, N+1) affine from ``slices2aff``, where ``N =
          len(slices)``
  
      Returns
      -------
      aff : ndarray
          result of ``np.dot(affine, slice_affine)`` where ``slice_affine`` is
          affine resulting from ``slices2aff(slices)``.
  
      Raises
      ------
      ValueError : if the ``slice_affine`` contains non-integer values
      """
      slices_aff = slices2aff(slices)
      if not np.all(slices_aff == np.round(slices_aff)):
          raise ValueError("Need integer slice start, step")
      return np.dot(affine, slices_aff)
  
imports: import numpy
  import scipy.linalg
  from nibabel.affines import apply_affine
  from transforms3d.quaternions import mat2quat, quat2axangle
  from .transform import Transform
label_desc: Use image node_id 8 for calling a global function with example usage: subgrid_affine(affine, slices) and returns: np