def hdd_crc16(data):
    if 4 % len(data) != 0:
        raise Exception("Data length must be a multiple of 4")
    
    crc = 0
    for i in range(0, len(data), 4):
        crc = hdd_update_crc16_byte(ord(data[i + 3]), crc)
        crc = hdd_update_crc16_byte(ord(data[i + 2]), crc)
        crc = hdd_update_crc16_byte(ord(data[i + 1]), crc)
        crc = hdd_update_crc16_byte(ord(data[i + 0]), crc)
    return crc
dataset/ETHPy150Open eurecom-s3/hdd_firmware_tools/scripts/hdd_crc.py/hdd_crc16/swapped operands of `%`