def _mute(fabric_cmd, *args):
    with settings(warn_only='true'):
        with hide('running', 'stdout', 'stderr', 'warnings'):
            return fabric_cmd(*args)

def some_remote_task():
    output = _mute(remote, 'uname -a')
What's the pythonic way to wrap several functions in the same with statements