I want to create a factory method like here.
class A: ... class B(A): def f(self): ... class C: ... def factory(cls): return cls()