class_docstr: Run queries to generate statistics on alerts.
docstr: Format the sns topic into and aws ARN
  
  Args:
      config: Loaded config from conf/ containing user defined topic (if available)
  
  Return:
      str: Formatted SNS topic arn using either the config option or default topic
docstr_tok: ["Format","the","sns","topic","into","and","aws","ARN","Args",":","config",":","Loaded","config","from","conf\/","containing","user","defined","topic","(","if","available",")","Return",":","str",":","Formatted","SNS","topic","arn","using","either","the","config","option","or","default","topic"]
code: def formatted_sns_topic_arn(cls, config):
      """Format the sns topic into and aws ARN
  
      Args:
          config: Loaded config from conf/ containing user defined topic (if available)
  
      Return:
          str: Formatted SNS topic arn using either the config option or default topic
      """
      prefix = config["global"]["account"]["prefix"]
      topic = config["lambda"]["rule_promotion_config"].get(
          "digest_sns_topic",
          cls.DEFAULT_STATS_SNS_TOPIC_SUFFIX.format(prefix),
      )
      return "arn:aws:sns:{region}:{account_id}:{topic}".format(
          region=config["global"]["account"]["region"],
          account_id=config["global"]["account"]["aws_account_id"],
          topic=topic,
      )
  
file_path: streamalert/streamalert/rule_promotion/publisher.py
imports: import boto3
  from streamalert.shared.logger import get_logger
label_desc: Use image node_id 2 for calling the StatsPublisher obj's underlying member method code with example usage: obj.formatted_sns_topic_arn(cls, config) and returns: str