<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def lerp_quat(from_quat, to_quat, percent):
 """Return linear interpolation of two quaternions."""


    # Check if signs need to be reversed.
    if dot_quat(from_quat, to_quat) < 0.0:
        to_sign = -1
    else:
        to_sign = 1

    # Simple linear interpolation
    percent_from = 1.0 - percent
    percent_to = percent

    result = Quat(
        percent_from * from_quat.x + to_sign * percent_to * to_quat.x,
        percent_from * from_quat.y + to_sign * percent_to * to_quat.y,
        percent_from * from_quat.z + to_sign * percent_to * to_quat.z,
        percent_from * from_quat.w + to_sign * percent_to * to_quat.w)

    return result