cpp_standalone/device.py from master