def METHOD_NAME(
    self, api: _PageApi, max_results: int | None, limit: int | None
) -> Generator[_HubSpotResult, None, None]:
    after = None
    count = 0
    # HubSpot returns a 400 HTTP error when trying to fetch more than 100 results
    if limit is not None:
        limit = min(limit, 100)
    while True:
        page = self._fetch_page(api, after=after, limit=limit)
        for result in page.results:
            if max_results is not None and count >= max_results:
                return
            yield result
            count += 1
        if (after := page.next_page_after()) is None:
            return