class D(method1): def method1(self): return class B: def b(self): return c class E(e): g: str h: Optional[int]