Updating participant attributes mid-conversation via Conversations API returns 409 Conflict

HTTP/1.1 409 Conflict
Content-Type: application/json
{
 "message": "Conversation update conflict. The conversation has been modified since the last read. Please retry with the latest version."
}

I am building a local integration test harness using Docker Compose to simulate Genesys Cloud API interactions. My mock server correctly handles initial conversation creation. However, when I attempt to update participant attributes mid-flow, the API rejects the PATCH request with a 409 Conflict due to version mismatch.

Here is the request body I am sending:

{
 "version": 1,
 "participants": [
 {
 "id": "agent-123",
 "attributes": {
 "customTag": "priority-high"
 }
 }
 ]
}

I read this in the documentation:

Ensure the version number in the request body matches the current version of the conversation resource. If the version is stale, the server will return a 409 Conflict.

My current code fetches the conversation details immediately before the PATCH, but the mock server introduces a slight delay in state updates. Is there a specific header or retry logic pattern I should implement in my Python SDK calls to handle this versioning correctly in a high-concurrency test environment?