class_docstr: An extremely flexible publisher that simply renders an attachment as text
  
  By default, this publisher accepts a template from the alert.context['slack_message_template']
  which is .format()'d with the current publication. This allows individual rules to render
  whatever they want. The template is a normal slack message, so it can support newline
  characters, and any of slack's pseudo-markdown.
  
  Subclass implementations of this can decide to override any of the implementation or come
  up with their own!
  
  If this publisher is run after the Summary publisher, it will correctly pull the original
  publication from the @slack._previous_publication, otherwise it uses the default publication.
class_docstr_tok: ["An","extremely","flexible","publisher","that","simply","renders","an","attachment","as","text","By","default",",","this","publisher","accepts","a","template","from","the","alert.context","[","'slack_message_template","'","]","which","is",".format","(",")","'d","with","the","current","publication",".","This","allows","individual","rules","to","render","whatever","they","want",".","The","template","is","a","normal","slack","message",",","so","it","can","support","newline","characters",",","and","any","of","slack","'s","pseudo-markdown",".","Subclass","implementations","of","this","can","decide","to","override","any","of","the","implementation","or","come","up","with","their","own","!","If","this","publisher","is","run","after","the","Summary","publisher",",","it","will","correctly","pull","the","original","publication","from","the","@","slack._previous_publication",",","otherwise","it","uses","the","default","publication","."]
code: def _render_text(cls, alert, publication):
      template = cls._get_format_template(alert, publication)
      args = cls._get_template_args(alert, publication)
  
      return template.format(**args)
  
imports: import calendar
  import cgi
  import json
  import urllib.request, urllib.parse, urllib.error
  from streamalert.shared.publisher import AlertPublisher, Register
  from streamalert.shared.description import RuleDescriptionParser
label_desc: Use image node_id 2 for calling the AttachStringTemplate obj's underlying member method code with example usage: obj._render_text(cls, alert, publication) and returns: template