nodes: 0, module; 1, function_definition; 2, function_name:zset_example; 3, parameters; 4, block; 5, expression_statement; 6, import_from_statement; 7, import_from_statement; 8, import_from_statement; 9, expression_statement; 10, expression_statement; 11, comment:# 97-114 is 'a' to 'r' in ASCII; 12, for_statement; 13, expression_statement; 14, expression_statement; 15, comment:# 17; 16, expression_statement; 17, comment:# 3; 18, expression_statement; 19, comment:# [1, 2, 3]; 20, expression_statement; 21, expression_statement; 22, comment:# <Page 3 of 3>; 23, expression_statement; 24, comment:# ['m', 'n', 'o', 'p', 'q']; 25, expression_statement; 26, comment:""" Example sorted set pagination.
      """; 27, dotted_name; 28, dotted_name; 29, dotted_name; 30, dotted_name; 31, dotted_name; 32, dotted_name; 33, assignment; 34, assignment; 35, identifier:x; 36, call; 37, block; 38, assignment; 39, call; 40, call; 41, call; 42, assignment; 43, call; 44, call; 45, call; 46, identifier:uuid; 47, identifier:uuid4; 48, identifier:redis; 49, identifier:StrictRedis; 50, identifier:zato; 51, identifier:redis_paginator; 52, identifier:ZSetPaginator; 53, identifier:conn; 54, call; 55, identifier:key; 56, call; 57, identifier:range; 58, argument_list; 59, expression_statement; 60, identifier:p; 61, call; 62, identifier:print; 63, argument_list; 64, identifier:print; 65, argument_list; 66, identifier:print; 67, argument_list; 68, identifier:page; 69, call; 70, identifier:print; 71, argument_list; 72, identifier:print; 73, argument_list; 74, attribute; 75, argument_list; 76, identifier:StrictRedis; 77, argument_list; 78, attribute; 79, argument_list; 80, integer:1; 81, integer:18; 82, call; 83, identifier:ZSetPaginator; 84, argument_list; 85, attribute; 86, attribute; 87, attribute; 88, attribute; 89, argument_list; 90, identifier:page; 91, attribute; 92, identifier:conn; 93, identifier:delete; 94, identifier:key; 95, string; 96, identifier:format; 97, attribute; 98, attribute; 99, argument_list; 100, identifier:conn; 101, identifier:key; 102, integer:6; 103, identifier:p; 104, identifier:count; 105, identifier:p; 106, identifier:num_pages; 107, identifier:p; 108, identifier:page_range; 109, identifier:p; 110, identifier:page; 111, integer:3; 112, identifier:page; 113, identifier:object_list; 114, string_content:paginator:{}; 115, call; 116, identifier:hex; 117, identifier:conn; 118, identifier:zadd; 119, identifier:key; 120, identifier:x; 121, call; 122, identifier:uuid4; 123, argument_list; 124, identifier:chr; 125, argument_list; 126, binary_operator:96 + x; 127, integer:96; 128, identifier:x
code: def zset_example():
      """ Example sorted set pagination.
      """
      from uuid import uuid4
      from redis import StrictRedis
      from zato.redis_paginator import ZSetPaginator
      
      conn = StrictRedis()
      key = 'paginator:{}'.format(uuid4().hex)
      
      # 97-114 is 'a' to 'r' in ASCII
      for x in range(1, 18):
          conn.zadd(key, x, chr(96 + x))
          
      p = ZSetPaginator(conn, key, 6)
      
      print(p.count)      # 17
      print(p.num_pages)  # 3
      print(p.page_range) # [1, 2, 3]
      
      page = p.page(3)
      print(page)             # <Page 3 of 3>
      print(page.object_list) # ['m', 'n', 'o', 'p', 'q']
          
      conn.delete(key)