code: def test_range_search(self):
      torch.manual_seed(10)
      d = 32
      index = faiss.IndexFlatL2(d)
      xb = torch.rand(100, d, dtype=torch.float32)
      index.add(xb)
  
      # torch cpu as ground truth
      thresh = 2.9
      xq = torch.rand(10, d, dtype=torch.float32)
      lims, D, I = index.range_search(xq, thresh)
  
      # compare against np
      lims_np, D_np, I_np = index.range_search(xq.numpy(), thresh)
  
      self.assertTrue(np.array_equal(lims.numpy(), lims_np))
      self.assertTrue(np.array_equal(D.numpy(), D_np))
      self.assertTrue(np.array_equal(I.numpy(), I_np))
  
file_path: faiss/tests/torch_test_contrib.py
imports: import faiss
  import torch
  import unittest
  import numpy
  import faiss.contrib.torch_utils
label_desc: Use image node_id 7 for calling the TestTorchUtilsCPU obj's underlying member method code with example usage: obj.test_range_search() without return types