Most withr functions have a with_() variant and a local_() variant. The local_() variant is especially appealing with multi-line expressions, so you don't have to nest lots of logic inside the with_() call.
I would like a similar alternative for with_mock() inside a test, i.e. the ability to put a local_mock() in place that will be cleared when it goes out of scope. Is that possible?