Compute CRC16 of data and return an int.

def compute_crc(data):
    """Compute CRC16 of data and return an int."""
    crc16 = crcmod.predefined.Crc('modbus')
    crc16.update(data)
    return int(crc16.hexdigest(), 16)