'pydantic Multi-field comparison

I would like to do A>B validation when I have the following pydantic class, do you know how to do that?

class Test(BaseModel):
    a: int
    b: int


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source