code: def iter_over_pages(
      *,
      step_size: int,
      sort_by: str = "sys/id",
      max_offset: int = MAX_SERVER_OFFSET,
      **kwargs: Any,
  ) -> Generator[Any, None, None]:
      searching_after = None
      last_page = None
  
      while True:
          if last_page:
              page_attribute = find_attribute(
                  entry=last_page[-1], path=sort_by
              )
  
              if not page_attribute:
                  raise ValueError(
                      f"Cannot find attribute {sort_by} in last page"
                  )
  
              searching_after = page_attribute.properties["value"]
  
          for offset in range(0, max_offset, step_size):
              page = get_single_page(
                  limit=min(step_size, max_offset - offset),
                  offset=offset,
                  sort_by=sort_by,
                  searching_after=searching_after,
                  **kwargs,
              )
  
              if not page:
                  return
  
              yield from page
  
              last_page = page
  
file_path: neptune-client/src/neptune/api/searching_entries.py
imports: from typing import TYPE_CHECKING, Any, Dict, Generator, Iterable, List, Optional
  from bravado.client import construct_request
  from bravado.config import RequestConfig
  from neptune.internal.backends.api_model import AttributeType, AttributeWithProperties, LeaderboardEntry
  from neptune.internal.backends.hosted_client import DEFAULT_REQUEST_KWARGS
  from neptune.internal.backends.nql import NQLAggregator, NQLAttributeOperator, NQLAttributeType, NQLEmptyQuery, NQLQuery, NQLQueryAggregate, NQLQueryAttribute
  from neptune.internal.init.parameters import MAX_SERVER_OFFSET
label_desc: Use image node_id 4 for calling a global function with example usage: iter_over_pages() without return types