code: def _parse_prev_failing_test_files(
      last_failed_tests: Dict[str, bool]
  ) -> Set[str]:
      prioritized_tests = set()
  
      # The keys are formatted as "test_file.py::test_class::test_method[params]"
      # We just need the test_file part
      for test in last_failed_tests:
          parts = test.split("::")
          if len(parts) > 1:
              test_file = parts[0]
              prioritized_tests.add(test_file)
  
      return prioritized_tests
  
file_path: pytorch/tools/testing/target_determination/heuristics/previously_failed_in_pr.py
imports: import json
  import os
  from pathlib import Path
  from typing import Any, Dict, List, Set
  from tools.stats.import_test_stats import ADDITIONAL_CI_FILES_FOLDER, TD_HEURISTIC_PREVIOUSLY_FAILED
  from tools.testing.target_determination.heuristics.interface import HeuristicInterface, TestPrioritizations
  from tools.testing.target_determination.heuristics.utils import python_test_file_to_test_name
label_desc: Use image node_id 2 for calling a global function with example usage: _parse_prev_failing_test_files(last_failed_tests) and returns: prioritized_tests