def METHOD_NAME(raise_err=False):
    commands_called = []
    class MockNotIsolatedActions(object):
        def __init__(self, base_dir=None):
            pass
        def call(self, cmd, **kwargs):
            commands_called.append((cmd, kwargs))
            if raise_err:
                raise_call_error()
    return (commands_called, MockNotIsolatedActions)