class_docstr: TestResult contains information useful for tracking test results
class_docstr_tok: ["TestResult","contains","information","useful","for","tracking","test","results"]
code: def _format_alert_results(self):
      failed = defaultdict(list)
      success = defaultdict(list)
      for rule_name in sorted(self._live_test_results):
          result = self._live_test_results[rule_name]
          for output, status in result.items():
              if not status:
                  failed[rule_name].append(output)
              else:
                  success[rule_name].append(output)
  
      return self._alert_result_block(
          success
      ), self._alert_result_block(failed, True)
  
imports: from collections import defaultdict
  import textwrap
  from streamalert.shared import rule
  from streamalert.shared.logger import get_logger
  from streamalert_cli.test.event import TestEvent
  from streamalert_cli.test.format import format_green, format_red, format_underline
label_desc: Use image node_id 13 for calling the TestResult obj's underlying member method code with example usage: obj._format_alert_results() and returns: self,  self