A decorator function you should apply to ``copy``

def memo(f):
        """
        A decorator function you should apply to ``copy``
        """
        def inner(self, memo=None, **kwargs):
            if memo is None:
                memo = {}
            if id(self) in memo:
                return memo[id(self)]
            else:
                c = f(self, memo, **kwargs)
                memo[id(self)] = c
                return c
        return inner