Added socket and sys imports to support the Device.probe method.