code: def exit_config_mode(self, exit_config="", pattern=""):
          
          output = ""
          if self.check_config_mode():
              self.write_channel(self.normalize_cmd(exit_config))
              output = self.read_until_pattern(pattern=pattern)
              if self.check_config_mode():
                  raise ValueError("Failed to exit configuration mode")
          log.debug("exit_config_mode: {}".format(output))
          return output
docs: Exit from configuration mode.
  
          :param exit_config: Command to exit configuration mode
          :type exit_config: str
  
          :param pattern: Pattern to terminate reading of channel
          :type pattern: str