Update device.py