def METHOD_NAME(
    self,
    start_url: str,
    page_crawl_keyword: str,
    max_number_of_page_to_crawl: int,
    max_depth_to_crawl: int,
):
    hrefs_to_crawl: List[Tuple[str, int]] = [(start_url, 0)]
    url_parts = urllib.parse.urlparse(start_url)
    baseurl = url_parts.scheme + "://" + url_parts.netloc
    crawled: Set[str] = set()
    while hrefs_to_crawl and len(crawled) < max_number_of_page_to_crawl:
        href, depth = hrefs_to_crawl.pop()
        if not href.startswith(baseurl):
            continue
        if href in crawled:
            continue
        logger.info(f"Crawling url {href}")
        logger.console(
            f"{len(crawled) + 1} / {len(crawled) + 1 + len(hrefs_to_crawl)} : Crawling url {href}"
        )
        try:
            self.library.go_to(href)
        except Exception as e:
            logger.warn(f"Exception while crawling {href}: {e}")
            continue
        BuiltIn().run_keyword(page_crawl_keyword)
        child_hrefs = self._gather_links(depth)
        crawled.add(href)
        hrefs_to_crawl = self._build_urls_to_crawl(
            child_hrefs, hrefs_to_crawl, crawled, baseurl, max_depth_to_crawl
        )
    return crawled