Note: If parent_device_id is set to a child device id, then the return value would be nil and no device will be created.