class A: def b(self): return c class C(): pass class B(method1): def method1(self): return class D(e): f: str g: Optional[int]