code: def test_get_test_stats_only_contains_allowed_types(self) -> None:
      self.maxDiff = None
      tests = ["test1", "test2", "test3", "test4", "test5"]
      heuristic1 = TestPrioritizations(
          tests_being_ranked=tests,
          high_relevance=["test3", "test4"],
      )
      heuristic2 = TestPrioritizations(
          tests_being_ranked=tests,
          probable_relevance=["test5::classA"],
      )
  
      aggregator = AggregatedHeuristics(unranked_tests=tests)
      aggregator.add_heuristic_results(HEURISTICS[0], heuristic1)
      aggregator.add_heuristic_results(HEURISTICS[1], heuristic2)
  
      stats3 = aggregator.get_test_stats(TestRun("test3"))
      stats5 = aggregator.get_test_stats(TestRun("test5::classA"))
  
      def assert_valid_dict(dict_contents: Dict[str, Any]) -> None:
          for key, value in dict_contents.items():
              self.assertTrue(isinstance(key, str))
              self.assertTrue(
                  isinstance(value, (str, float, int, list, dict)),
                  f"{value} is not a str, float, or dict",
              )
              if isinstance(value, dict):
                  assert_valid_dict(value)
              elif isinstance(value, list):
                  for item in value:
                      assert_valid_dict(item)
  
      assert_valid_dict(stats3)
      assert_valid_dict(stats5)
  
imports: import io
  import json
  import pathlib
  import sys
  import unittest
  from typing import Any, Dict, Set
  from unittest import mock
label_desc: Use image node_id 5 for calling the TestAggregatedHeuristics obj's underlying member method code with example usage: obj.test_get_test_stats_only_contains_allowed_types() without return types