docstr: Returns list of jobs grouped by failureCaptures from the input list
docstr_tok: ["Returns","list","of","jobs","grouped","by","failureCaptures","from","the","input","list"]
code: def get_unique_failures(
      self, jobs: List[Any]
  ) -> Dict[str, List[Any]]:
      """
      Returns list of jobs grouped by failureCaptures from the input list
      """
      failures = defaultdict(list)
      for job in jobs:
          if job["conclusion"] == "failure":
              found_similar_failure = False
              if "failureCaptures" not in job:
                  failures["unclassified"] = [job]
                  continue
  
              # This is now a list returned by HUD API, not a string
              failureCaptures = " ".join(job["failureCaptures"])
  
              for failure in failures:
                  seq = SequenceMatcher(None, failureCaptures, failure)
                  if seq.ratio() > SIMILARITY_THRESHOLD:
                      failures[failure].append(job)
                      found_similar_failure = True
                      break
              if not found_similar_failure:
                  failures[failureCaptures] = [job]
  
      return failures
  
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 3 for calling the JobStatus obj's underlying member method code with example usage: obj.get_unique_failures(jobs) and returns: failures