Damp the movement of an animation curve
I have found a solution to this.
#Retrieve the current roation

current_q = Quaternion((kf_w.co[1], kf_x.co[1], kf_y.co[1], kf_z.co[1]))

current_eulr = current_q.to_euler()
        
#Element-wise multiplication with a weight vector

new_euler = Euler((x * y for x, y in zip( weights,current_eulr )), 'XYZ')

new_q = new_euler.to_quaternion()