def run_with_patches(self, f, *args, **kw):
        self.patch()
        try:
            return f(*args, **kw)
        finally:
            self.restore()
Run 'f' with the given args and kwargs with all patches applied.
dataset/ETHPy150Open byt3bl33d3r/pth-toolkit/lib/python2.7/site-packages/samba/external/testtools/monkey.py/MonkeyPatcher.run_with_patches