code: def make_deprecated_class(oldname, NewClass):
      
      msg = ("{module}.{} has been renamed to {module}.{}"
             .format(oldname, NewClass.__name__, module=NewClass.__module__))
  
      class OldClass(NewClass):
          def __new__(cls, *args, **kwargs):
              raise NotImplementedError(msg)
      OldClass.__doc__ = msg
      OldClass.__qualname__ = OldClass.__name__ = oldname
      return OldClass
docs: Returns a class that raises NotImplementedError on instantiation.
      e.g.:
      >>> Kern = make_deprecated_class("Kern", Kernel)