Task: Parse MongoDB ObjectId in a Pydantic Model
Task: Parse MongoDB ObjectId in a Pydantic Model: a task in Terminal-Lego-15k (Harbor dataset). You need to create a Python solution that correctly handles MongoDB ObjectId fields in Pydantic models. The solution must support both Pydantic v1 and Pydantic v2 style approaches.
The task
You need to create a Python solution that correctly handles MongoDB `ObjectId` fields in Pydantic models. The solution must support both **Pydantic v1** and **Pydantic v2** style approaches.
Part of PrimeIntellect/Terminal-Lego-15k.