def METHOD_NAME(self, func, retries=10):
    for retry in range(retries):
        try:
            with self.txn(lock=False) as s:
                return func(s)
        except ConcurrentModificationError:
            if retry + 1 < retries:
                pass
            raise