def auto_update(cls, function):
        """
        This class method could be used as decorator on subclasses, it ensures
        update method is called after function execution.
        """

        def wrapper(self, *args, **kwargs):
            f = function(self, *args, **kwargs)
            self.update()
            return f
        return wrapper
def auto_update ( cls , function ) : def wrapper ( self , * args , ** kwargs ) : f = function ( self , * args , ** kwargs ) self . update ( ) return f return wrapper
This class method could be used as decorator on subclasses, it ensures
        update method is called after function execution.