code: def get_tests_for_circleci(
      workflow_run_id: int, workflow_run_attempt: int
  ) -> List[Dict[str, Any]]:
      # Parse the reports and transform them to JSON
      test_cases = []
      for xml_report in Path(".").glob("**/test/test-reports/**/*.xml"):
          test_cases.extend(
              parse_xml_report(
                  "testcase",
                  xml_report,
                  workflow_run_id,
                  workflow_run_attempt,
              )
          )
  
      return test_cases
  
file_path: pytorch/tools/stats/upload_test_stats.py
imports: import argparse
  import os
  import sys
  import xml.etree.ElementTree
  from pathlib import Path
  from tempfile import TemporaryDirectory
  from typing import Any, Dict, List, Optional
  from tools.stats.upload_stats_lib import download_gha_artifacts, download_s3_artifacts, unzip, upload_workflow_stats_to_s3
label_desc: Use image node_id 5 for calling a global function with example usage: get_tests_for_circleci(workflow_run_id, workflow_run_attempt) and returns: test_cases