human
Complete this python program:
def get_serials1(path=STORAGE1):
assistant
#Here is the Python program you requested.

    """get serials from android\s shared preference xml
    """
    if (not os.path.isfile(path)):
        return []
    storage = parse_preference(path)
    salt = storage.get('AmazonSaltKey')
    if (salt and (len(salt) == 16)):
        obfuscation = AndroidObfuscationV2(a2b_hex(salt))
    else:
        obfuscation = AndroidObfuscation()
    def get_value(key):
        encrypted_key = obfuscation.encrypt(key)
        encrypted_value = storage.get(encrypted_key)
        if encrypted_value:
            return obfuscation.decrypt(encrypted_value)
        return ''
    try:
        dsnid = get_value('DsnId')
    except:
        sys.stderr.write('cannot    get    DsnId\n')
        return []
    try:
        tokens = set(get_value('kindle.account.tokens').split(','))
    except:
        return []
    serials = []
    if dsnid:
        serials.append(dsnid)
    for token in tokens:
        if token:
            serials.append(('%s%s' % (dsnid, token)))
            serials.append(token)
    return serials