keyword parameter type renamed to device_type. type is a reserved keyword