def HasNext(self, page):
    """Checks if there is still a page left to query.

    This method is meant to be used with NextPage(). When using DataService,
    the paging mechanism is different from other services. For details, see
    https://developers.google.com/adwords/api/docs/guides/bid-landscapes#paging_through_results.

    Args:
      page: A dict-like page returned in an API response, where the type depends
          on the configured SOAP client. The page contains the 'totalNumEntries'
          key whose value represents the total number of results from making the
          query to the AdWords API services.

    Returns:
      True if there is still a page left.

    Raises:
      ValueError: If the start index of this object is None, meaning that the
          LIMIT clause hasn't been set before.
    """
    if self._start_index is None:
      raise ValueError('Cannot page through query with no LIMIT clause.')
    if page is None:
      raise ValueError('The passed page cannot be None.')

    # DataService has a different paging mechanism, resulting in different
    # method of determining if there is still a page left.
    if (self._PAGE_TYPE in page
        and page[self._PAGE_TYPE] in self._BID_LANDSCAPE_PAGES):
      if self._ENTRIES in page:
        total_landscape_points = sum([len(bid_landscape[self._LANDSCAPE_POINTS])
                                      for bid_landscape in page[self._ENTRIES]])
      else:
        total_landscape_points = 0
      return total_landscape_points >= self._page_size

    if not self._total_num_entries:
      self._total_num_entries = page[self._TOTAL_NUM_ENTRIES]
    return self._start_index + self._page_size < self._total_num_entries
Checks if there is still a page left to query.

    This method is meant to be used with NextPage(). When using DataService,
    the paging mechanism is different from other services. For details, see
    https://developers.google.com/adwords/api/docs/guides/bid-landscapes#paging_through_results.

    Args:
      page: A dict-like page returned in an API response, where the type depends
          on the configured SOAP client. The page contains the 'totalNumEntries'
          key whose value represents the total number of results from making the
          query to the AdWords API services.

    Returns:
      True if there is still a page left.

    Raises:
      ValueError: If the start index of this object is None, meaning that the
          LIMIT clause hasn't been set before.