Decorator to be used in conjunction with :class:`LocalMixin` methods.

def local_property(f):
    '''Decorator to be used in conjunction with :class:`LocalMixin` methods.
    '''
    name = f.__name__

    def _(self):
        local = self.local
        if name not in local:
            setattr(local, name, f(self))
        return getattr(local, name)

    return property(_, doc=f.__doc__)