def METHOD_NAME(
    page_url: Union[str, List[str]],
    stable_pattern: str,
    max_stable_count: int = 3,
    unstable_pattern: str = "",
    max_unstable_count: int = 0,
    url_prefix="",
) -> List[Dict[str, str]]:
    parser = FileLinksParser()
    if isinstance(page_url, str):
        page_urls = [page_url]
    else:
        assert isinstance(page_url, list)
        page_urls = page_url
    content = ""
    for url in page_urls:
        try:
            content += read_page(url)
        except Exception:
            logging.exception("Could not read page %s", url)
    parser.feed(content)
    stables = []
    unstables = []
    for link in parser.links:
        link = url_prefix + link
        if len(stables) < max_stable_count and re.search(stable_pattern, link):
            stables.append({"version": re.search(stable_pattern, link).group(1), "url": link})
        elif len(unstables) < max_unstable_count and re.search(unstable_pattern, link):
            unstables.append({"version": re.search(unstable_pattern, link).group(1), "url": link})
    result = stables + unstables
    for item in result:
        url = item["url"]
        response = requests.head(url)
        if response.status_code not in [200, 302]:
            #print(f"Got {response.status_code} when downloading {url}")
            raise RuntimeError(f"Got {response.status_code} when downloading {url}")
    return stables + unstables