def QueryRange(client, table, cls, key, range_desc, callback):
  """Queries the contents of a range identified by --hash_key.
  """
  def _OnQuery(retry_cb, count, items):
    for item in items:
      pprint.pprint(item)
    if len(items) == 100:
      retry_cb(items[-1].GetKey(), count + len(items))
    else:
      return callback(count % 'queried %d items')

  def _Query(last_key=None, count=0):
    cls.RangeQuery(client, key.hash_key, range_desc, limit=100,
                   col_names=(options.options.col_names or None),
                   callback=partial(_OnQuery, _Query, count),
                   excl_start_key=last_key)

  _Query()
dataset/ETHPy150Open viewfinderco/viewfinder/backend/db/tools/dba.py/QueryRange/swapped operands of `%`