docstr: make sure that the codes generated by the standalone codec are the same
  between an
     IndexRefine with ResidualQuantizer
  and
     IVF with ResidualCoarseQuantizer
  both are the centroid id concatenated with the code.
code: def test_equiv_rcq_rq(self):
      """make sure that the codes generated by the standalone codec are the same
      between an
         IndexRefine with ResidualQuantizer
      and
         IVF with ResidualCoarseQuantizer
      both are the centroid id concatenated with the code.
      """
      ds = SyntheticDataset(16, 400, 100, 0)
      index1 = faiss.index_factory(ds.d, "RQ2x3,Refine(Flat)")
      index1.train(ds.get_train())
      irq = faiss.downcast_index(index1.base_index)
      # because the default beam factor for RCQ is 4
      irq.rq.max_beam_size = 4
  
      index2 = faiss.index_factory(ds.d, "IVF64(RCQ2x3),Flat")
      index2.train(ds.get_train())
      quantizer = faiss.downcast_index(index2.quantizer)
      quantizer.rq = irq.rq
      index2.is_trained = True
  
      codes1 = index1.sa_encode(ds.get_database())
      codes2 = index2.sa_encode(ds.get_database())
  
      np.testing.assert_array_equal(codes1, codes2)
  
imports: from __future__ import print_function
  import numpy
  import unittest
  import faiss
  from common_faiss_tests import get_dataset_2
  from faiss.contrib.datasets import SyntheticDataset
  from faiss.contrib.inspect_tools import get_additive_quantizer_codebooks
label_desc: Use image node_id 2 for calling the TestRefine obj's underlying member method code with example usage: obj.test_equiv_rcq_rq() without return types