docs: def returner(ret):
      '''
      Send an mattermost message with the data
      '''
  
      _options = _get_options(ret)
  
      api_url = _options.get('api_url')
      channel = _options.get('channel')
      username = _options.get('username')
      hook = _options.get('hook')
  
      if not hook:
          log.error('mattermost.hook not defined in salt config')
          return
  
      returns = ret.get('return')
  
      message = ('id: {0}\r\n'
                 'function: {1}\r\n'
                 'function args: {2}\r\n'
                 'jid: {3}\r\n'
                 'return: {4}\r\n').format(
                      ret.get('id'),
                      ret.get('fun'),
                      ret.get('fun_args'),
                      ret.get('jid'),
                      returns)
  
      mattermost = post_message(channel,
                                message,
                                username,
                                api_url,
                                hook)
      return mattermost