def v_of_bezier(t, cx, cy):
    """
    Returns the velocity of a cubic Bezier curve at t where t is in [0,1]
    """

    dy_dt = (
        -3 * (1 - t) ** 2 * cy[0]
        + 3 * (3 * t**2 - 4 * t + 1) * cy[1]
        + 3 * (2 * t - 3 * t**2) * cy[2]
        + 3 * t**2 * cy[3]
    )
    dx_dt = (
        -3 * (1 - t) ** 2 * cx[0]
        + 3 * (3 * t**2 - 4 * t + 1) * cx[1]
        + 3 * (2 * t - 3 * t**2) * cx[2]
        + 3 * t**2 * cx[3]
    )

    return dy_dt / dx_dt

    Returns the velocity of a cubic Bezier curve at t where t is in [0,1]
    
infinigen/core/util/imu.py