def returns_clone(func):
    def inner(self, *args, **kwargs):
        clone = self.clone()  # Assumes object implements `clone`.
        func(clone, *args, **kwargs)
        return clone
    inner.call_local = func  # Provide a way to call without cloning.
    return inner
Method decorator that will "clone" the object before applying the given
dataset/ETHPy150Open coleifer/peewee/peewee.py/returns_clone