class MetaHandler(type):

    def __new__(cls, name, bases, attrs):
        instance = type.__new__(cls, name, bases, attrs)
super_instance = super(instance, instance)
if hasattr(super_instance, 'prepare') and hasattr(instance, 'prepare'):
    super_prepare = getattr(super_instance, 'prepare')
sub_prepare = getattr(instance, 'prepare')

def new_prepare(self):
    super_prepare(self)
sub_prepare(self)
setattr(instance, 'prepare', new_prepare)
return instance


class BaseHandler(object, metaclass=MetaHandler):
    pass

def prepare(self):
    print('BaseHandler.prepare')


class SubHandler(BaseHandler):

    def prepare(self):
        print('SubHandler.prepare')
In python, how can I ensure that one of my class's methods is always called even if a subclass overrides it?