docstr: check that the error is in the same ballpark as PQ.
docstr_tok: ["check","that","the","error","is","in","the","same","ballpark","as","PQ","."]
code: def test_training(self):
      """check that the error is in the same ballpark as PQ."""
      ds = datasets.SyntheticDataset(32, 3000, 3000, 0)
  
      xt = ds.get_train()
      xb = ds.get_database()
  
      M = 4
      nbits = 4
  
      lsq = faiss.LocalSearchQuantizer(ds.d, M, nbits)
      lsq.train(xt)
      err_lsq = eval_codec(lsq, xb)
  
      pq = faiss.ProductQuantizer(ds.d, M, nbits)
      pq.train(xt)
      err_pq = eval_codec(pq, xb)
  
      print(err_lsq, err_pq)
      self.assertLess(err_lsq, err_pq)
  
imports: import numpy
  import faiss
  import unittest
  from faiss.contrib import datasets
label_desc: Use image node_id 1 for calling the TestLocalSearchQuantizer obj's underlying member method code with example usage: obj.test_training() without return types