from dataclasses import dataclass
from typing import Self


@dataclass
class Foo:
    a: int
    b: int

    def sum(self: Self) -> int:
        return self.a + self.b

    def greater(self: Self) -> int:
        return max(self.a, self.b)
