@contextmanager<EOL><INDENT>def valid_return_codes(self, *codes):<DEDENT>
previous_codes = self._valid_return_codes<EOL>self._valid_return_codes = codes<EOL>yield<EOL>self._valid_return_codes = previous_codes<EOL>
Sets codes which are considered valid when returned from
        command modules. The default is (0, ).

        Should be used as a context::

            with api.valid_return_codes(0, 1):
                api.shell('test -e /tmp/log && rm /tmp/log')