def METHOD_NAME(port, data):
    type = XCVR_EEPROM_TYPE_UNKNOWN
    if (port in platform_sfputil.osfp_ports) or (port in platform_sfputil.qsfp_ports):
        if data is None:
            return type
        if data[0] in OSFP_TYPE_ID:
            code = 0
            for i in range(128, 222):
                code += int(data[i], 16)
            if (code & 0xff) == int(data[222], 16):
                type = XCVR_EEPROM_TYPE_OSFP
            else:
                type = XCVR_EEPROM_TYPE_QSFP
        else:
            type = XCVR_EEPROM_TYPE_QSFP
    else:
        type = XCVR_EEPROM_TYPE_SFP
    return type