class_docstr: to test the sorted id bounds, there are a few cases to consider 
class_docstr_tok: ["to","test","the","sorted","id","bounds",",","there","are","a","few","cases","to","consider"]
code: def do_test_sorted(self, imin, imax, n=100):
      selr = faiss.IDSelectorRange(imin, imax, True)
      sp = faiss.swig_ptr
      for seed in range(10):
          rs = np.random.RandomState(seed)
          ids = rs.choice(30, n).astype("int64")
          ids.sort()
          j01 = np.zeros(2, dtype="uint64")
          selr.find_sorted_ids_bounds(
              len(ids), sp(ids), sp(j01[:1]), sp(j01[1:])
          )
          j0, j1 = j01.astype(int)
          (ref_idx,) = np.where((ids >= imin) & (ids < imax))
          np.testing.assert_array_equal(ref_idx, np.arange(j0, j1))
  
imports: import numpy
  import faiss
  import unittest
  import sys
  import gc
  from faiss.contrib import datasets
  from faiss.contrib.evaluation import sort_range_res_2, check_ref_range_results
label_desc: Use image node_id 1 for calling the TestSortedIDSelectorRange obj's underlying member method code with example usage: obj.do_test_sorted(imin, imax, n) without return types