<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def crc7(data):
 """ Compute CRC of a whole message. """

    crc = 0

    for c in data:
        crc = CRC7_TABLE[crc ^ c]

    return crc