code: def _format_syslog_config(cmd_ret):
      '''
      Helper function to format the stdout from the get_syslog_config function.
  
      cmd_ret
          The return dictionary that comes from a cmd.run_all call.
      '''
      ret_dict = {'success': cmd_ret['retcode'] == 0}
  
      if cmd_ret['retcode'] != 0:
          ret_dict['message'] = cmd_ret['stdout']
      else:
          for line in cmd_ret['stdout'].splitlines():
              line = line.strip()
              cfgvars = line.split(': ')
              key = cfgvars[0].strip()
              value = cfgvars[1].strip()
              ret_dict[key] = value
  
      return ret_dicf _format_syslog_config(cmd_ret):
      '''
      Helper function to format the stdout from the get_syslog_config function.
  
      cmd_ret
          The return dictionary that comes from a cmd.run_all call.
      '''
      ret_dict = {'success': cmd_ret['retcode'] == 0}
  
      if cmd_ret['retcode'] != 0:
          ret_dict['message'] = cmd_ret['stdout']
      else:
          for line in cmd_ret['stdout'].splitlines():
              line = line.strip()
              cfgvars = line.split(': ')
              key = cfgvars[0].strip()
              value = cfgvars[1].strip()
              ret_dict[key] = value
  
      return ret_dict
docs: Helper function to format the stdout from the get_syslog_config function.
  
      cmd_ret
          The return dictionary that comes from a cmd.run_all call.