<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def knx_to_time(knxdata):
 """Converts a KNX time to a tuple of a time object and the day of week"""


    if len(knxdata) != 3:
        raise KNXException("Can only convert a 3 Byte object to time")

    dow = knxdata[0] >> 5
    res = time(knxdata[0] & 0x1f, knxdata[1], knxdata[2])

    return [res, dow]