code: def get_recurrently_failing_jobs_alerts(
      repo: str, branch: str, job_name_regex: str
  ) -> List[Dict[str, Any]]:
      job_names, sha_grid = fetch_hud_data(repo=repo, branch=branch)
  
      filtered_job_names = set(
          filter_job_names(job_names, job_name_regex)
      )
      if job_name_regex:
          print()
          print(f"Filtered to {len(filtered_job_names)} jobs:")
          if len(filtered_job_names) == 0:
              print("No jobs matched the regex")
          elif len(filtered_job_names) == len(job_names):
              print("All jobs matched the regex")
          else:
              print("\n".join(filtered_job_names))
  
      (recurrently_failing_jobs, flaky_jobs) = classify_jobs(
          job_names, sha_grid, filtered_job_names
      )
  
      alerts = []
      for job in recurrently_failing_jobs:
          entry = {
              "AlertType": "Recurrently Failing Job",
              "AlertObject": job.job_name,
              "OncallTeams": [],
              "OncallIndividuals": [],
              "Flags": [],
              "sha": job.failure_chain[-1]["sha"],
              "branch": branch,
          }
          alerts.append(entry)
      return alerts
  
imports: import argparse
  import json
  import os
  import re
  from collections import defaultdict
  from difflib import SequenceMatcher
  from typing import Any, Dict, List, Set, Tuple
  import requests
  from setuptools import distutils
label_desc: Use image node_id 8 for calling a global function with example usage: get_recurrently_failing_jobs_alerts(repo, branch, job_name_regex) and returns: alerts