def METHOD_NAME(handler):
    "Function decorator to memoize ``MultiFunction`` handlers."
    def _memoized_handler(self, o):
        c = getattr(self, "_memoized_handler_cache")
        r = c.get(o)
        if r is None:
            r = handler(self, o)
            c[o] = r
        return r
    return _memoized_handler