def transplant_class(cls, module):
 class C(cls, ):
  pass
 C.__module__ = module
 C.__name__ = cls.__name__
 C.__qualname__ = cls.__name__
 return C

def transplant_class ( cls , module ) : class C ( cls , ) : pass C . __module__ = module C . __name__ = cls . __name__ C . __qualname__ = cls . __name__ return C
make a class appear to reside in module .