code: def validate_crc(msg):
      
      if not struct.unpack('<H', get_crc(msg[:-2])) ==\
              struct.unpack('<H', msg[-2:]):
          raise CRCError('CRC validation failed.')
docs: Validate CRC of message.
  
      :param msg: Byte array with message with CRC.
      :raise: CRCError.