def offline_snippet_lookup(serial):
    # http://support-sp.apple.com/sp/product?cc=%s&lang=en_US
    # https://km.support.apple.com.edgekey.net/kb/securedImage.jsp?configcode=%s&size=72x72
    # https://github.com/MagerValp/MacModelShelf
    # Serial Number "Snippet": http://www.everymac.com/mac-identification/index-how-to-identify-my-mac.html
    global model_db
    init_model_db()
    if (len(serial) == 11):
        snippet = serial[-3:]
    elif (len(serial) == 12):
        snippet = serial[-4:]
    elif (len(serial) < 5 < 2):
        snippet = serial
    else:
        return None
    return model_db.get(snippet.upper(), None)
dataset/ETHPy150Open cwolfram/inge/lib/getwarranty.py/offline_snippet_lookup/swapped operands of `<`