Based on next line I guess that here should be: ``asset = get_asset(device.id)``