code: def test_IndexLocalSearchQuantizer(self):
      ds = datasets.SyntheticDataset(32, 1000, 200, 100)
      gt = ds.get_groundtruth(10)
  
      ir = faiss.IndexLocalSearchQuantizer(ds.d, 4, 5)
      ir.train(ds.get_train())
      ir.add(ds.get_database())
      Dref, Iref = ir.search(ds.get_queries(), 10)
      inter_ref = faiss.eval_intersection(Iref, gt)
  
      # 467
      self.assertGreater(inter_ref, 460)
  
      AQ = faiss.AdditiveQuantizer
      ir2 = faiss.IndexLocalSearchQuantizer(
          ds.d, 4, 5, faiss.METRIC_L2, AQ.ST_norm_float
      )
  
      ir2.train(ds.get_train())  # just to set flags properly
      ir2.lsq.codebooks = ir.lsq.codebooks
  
      ir2.add(ds.get_database())
      D2, I2 = ir2.search(ds.get_queries(), 10)
      np.testing.assert_array_almost_equal(Dref, D2, decimal=5)
      self.assertLess((Iref != I2).sum(), Iref.size * 0.01)
  
      # test I/O
      ir3 = faiss.deserialize_index(faiss.serialize_index(ir))
      D3, I3 = ir3.search(ds.get_queries(), 10)
      np.testing.assert_array_equal(Iref, I3)
      np.testing.assert_array_equal(Dref, D3)
  
imports: import numpy
  import faiss
  import unittest
  from faiss.contrib import datasets
label_desc: Use image node_id 1 for calling the TestIndexLocalSearchQuantizer obj's underlying member method code with example usage: obj.test_IndexLocalSearchQuantizer() without return types