class_docstr: Sort the samples based on the sort key and then sample sequentially.
  
  Parameters
  ----------
  sort_keys
      List of the sort keys.
  reverse
      Whether to sort by descending order.
class_docstr_tok: ["Sort","the","samples","based","on","the","sort","key","and","then","sample","sequentially",".","Parameters","--","--","--","--","--","sort_keys","List","of","the","sort","keys",".","reverse","Whether","to","sort","by","descending","order","."]
code: def __init__(self, sort_keys: Sequence, reverse: bool = True):
      assert len(sort_keys) > 0
      self._sorted_ids = sorted(
          range(len(sort_keys)),
          key=lambda i: sort_keys[i],
          reverse=reverse,
      )
  
imports: import math
  import random
  import warnings
  import numpy
  import abc
  import logging
  from typing import Union, Sequence, Optional, List
  from ..base import INT_TYPES
label_desc: Use image node_id 1 to create a new SortedSampler object from inherited base classes: BaseSampler with example: obj = SortedSampler(sort_keys, reverse)