transformListToTransform = (tlist, min = 0, max = null) => {
  if (!tlist) {
    return svg.createSVGTransformFromMatrix(svg.createSVGMatrix())
  }

  const start = Number.parseInt(min, 10)
  const end = Number.parseInt(max ?? tlist.numberOfItems - 1, 10)
  const low = Math.min(start, end)
  const high = Math.max(start, end)

  let combinedMatrix = svg.createSVGMatrix()
  for (let i = low; i <= high; i++) {
    // If out of range, use identity
    const currentMatrix =
      i >= 0 && i < tlist.numberOfItems
        ? tlist.getItem(i).matrix
        : svg.createSVGMatrix()
    combinedMatrix = matrixMultiply(combinedMatrix, currentMatrix)
  }

  return svg.createSVGTransformFromMatrix(combinedMatrix)
}
Consolidates a transform list into a single matrix transform without modifying the original list.
@function transformListToTransform
@param {SVGTransformList} tlist - The transform list
@param {number} [min=0] - Optional start index
@param {number} [max] - Optional end index, defaults to tlist length-1
@returns {SVGTransform} A single transform from the combined matrices