def check_for_reboot(saved_device, uptime, last_changed):
    """Check if the network devices has rebooted."""
    # Did uptime decrease or did last_changed decrease
    return uptime < saved_device.uptime or last_changed < saved_device.last_changed