'Exit configuration mode.'

def exit_config_mode(self, exit_config=u'end'):

    output = u''
    if self.check_config_mode():
        output = self.send_command_timing(exit_config, strip_prompt=False, strip_command=False)
        if (u'Uncommitted    changes    found' in output):
            output += self.send_command_timing(u'no\n', strip_prompt=False, strip_command=False)
        if self.check_config_mode():
            raise ValueError(u'Failed    to    exit    configuration    mode')
    return output
