class_docstr: TestRunner to handle running various tests
code: def _finalize(self):
      summary = [
          format_underline("\nSummary:\n"),
          "Total Tests: {}".format(self._passed + self._failed),
          format_green("Pass: {}".format(self._passed))
          if self._passed
          else "Pass: 0",
          format_red("Fail: {}\n".format(self._failed))
          if self._failed
          else "Fail: 0\n",
      ]
  
      print("\n".join(summary))
  
      # If rule are being tested and no filtering is being performed, log any untested rules
      if self._testing_rules and not self._is_filtered:
          all_rules = (
              set(rule.Rule.rule_names()) - rule.Rule.disabled_rules()
          )
          untested_rules = sorted(
              all_rules.difference(self._tested_rules)
          )
          if not untested_rules:
              return
          print(
              format_yellow(
                  "No test events configured for the following rules:"
              )
          )
          for rule_name in untested_rules:
              print(format_yellow(rule_name))
  
imports: import argparse
  import os
  import jmespath
  from mock import patch, MagicMock
  from streamalert.alert_processor import main
  from streamalert.alert_processor.helpers import compose_alert
  from streamalert.alert_processor.outputs.output_base import OutputDispatcher
  from streamalert.classifier import classifier
  from streamalert.rules_engine import rules_engine
  from streamalert.shared import rule
  from streamalert.shared.config import ConfigError
  from streamalert.shared.logger import get_logger
  from streamalert.shared.stats import RuleStatisticTracker
  from streamalert_cli.helpers import check_credentials
  from streamalert_cli.test.format import format_green, format_red, format_underline, format_yellow
  from streamalert_cli.test.mocks import LookupTableMocks, ThreatIntelMocks
  from streamalert_cli.test.event_file import TestEventFile
  from streamalert_cli.utils import CLICommand, DirectoryType, generate_subparser, UniqueSortedFileListAction, UniqueSortedListAction
label_desc: Use image node_id 7 for calling the TestRunner obj's underlying member method code with example usage: obj._finalize() without return types