def METHOD_NAME(
    self,
    new_hrefs_to_crawl: List[Tuple[str, int]],
    old_hrefs_to_crawl: List[Tuple[str, int]],
    crawled: Set[str],
    baseurl: str,
    max_depth: int,
) -> List[Tuple[str, int]]:
    new_hrefs = []
    for href, depth in new_hrefs_to_crawl:
        if depth > max_depth:
            continue
        if href in [h[0] for h in old_hrefs_to_crawl]:
            continue
        if href in crawled:
            continue
        if not href.startswith(baseurl):
            continue
        logger.debug(f"Adding link to {href}")
        new_hrefs.append((href, depth))
    return new_hrefs + old_hrefs_to_crawl