def METHOD_NAME(self, *args, **kwds):
    name = f.__name__
    self.startObserving(name, *args, **kwds)
    try:
        ret = f(self, *args, **kwds)
        self.endObserving(name, ret)
    except BaseException as e:
        self.failObserving(name, e)
        raise
    return ret