code: def do_test_range(self, metric):
      ds = datasets.SyntheticDataset(32, 0, 1000, 10)
      xq = ds.get_queries()
      xb = ds.get_database()
      D, I = faiss.knn(xq, xb, 10, metric=metric)
      threshold = float(D[:, -1].mean())
  
      index = faiss.IndexFlat(32, metric)
      index.add(xb)
      ref_lims, ref_D, ref_I = index.range_search(xq, threshold)
  
      new_lims, new_D, new_I = range_ground_truth(
          xq,
          ds.database_iterator(bs=100),
          threshold,
          ngpu=0,
          metric_type=metric,
      )
  
      evaluation.check_ref_range_results(
          ref_lims, ref_D, ref_I, new_lims, new_D, new_I
      )
  
imports: import faiss
  import unittest
  import numpy
  import platform
  import os
  import random
  import tempfile
  from faiss.contrib import datasets
  from faiss.contrib import inspect_tools
  from faiss.contrib import evaluation
  from faiss.contrib import ivf_tools
  from faiss.contrib import clustering
  from faiss.contrib import big_batch_search
  from common_faiss_tests import get_dataset_2
label_desc: Use image node_id 2 for calling the TestExhaustiveSearch obj's underlying member method code with example usage: obj.do_test_range(metric) without return types