<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def qdq2av(q, dq):
 """ Derive angular velocity from a unit quaternion and its derivative with respect to time. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/qdq2av_c.html :param q: Unit SPICE quaternion. :type q: 4-Element Array of floats :param dq: Derivative of q with respect to time :type dq: 4-Element Array of floats :return: Angular velocity defined by q and dq. :rtype: 3-Element Array of floats """

    q = stypes.toDoubleVector(q)
    dq = stypes.toDoubleVector(dq)
    vout = stypes.emptyDoubleVector(3)
    libspice.qdq2av_c(q, dq, vout)
    return stypes.cVectorToPython(vout)