code: def matrixToMathTransform(matrix):
      
      if isinstance(matrix, ShallowTransform):
          return matrix
      off, scl, rot = MathTransform(matrix).decompose()
      return ShallowTransform(off, scl, rot)
docs: Take a 6-tuple and return a ShallowTransform object.