def get_object_range(page, page_size):
 max_id = 5
 start = min(((page - 1) * page_size), max_id)
 end = min((start + page_size), (max_id + 1))
 return range(start, end)

def get_object_range ( page , page_size ) : max_id = 5 start = min ( ( ( page - 1 ) * page_size ) , max_id ) end = min ( ( start + page_size ) , ( max_id + 1 ) ) return range ( start , end )
get the range of expected object ids given a page and page size .