def validate_crc(msg):
if not struct.unpack('<STR_LIT>', get_crc(msg[:-<NUM_LIT:2>])) ==struct.unpack('<STR_LIT>', msg[-<NUM_LIT:2>:]):<EOL><INDENT>raise CRCError('<STR_LIT>')<EOL><DEDENT>
Validate CRC of message.

    :param msg: Byte array with message with CRC.
    :raise: CRCError.