def METHOD_NAME(_self):
    name = '_invalidate_%s' % fn.__name__
    if not hasattr(_self, name):
        setattr(_self, name, _invalidate)
    name = '_invalidate_all'
    if not hasattr(_self, name):
        setattr(_self, name, _invalidate_all)