code: def test_OIVFPQ(self):
      # Parameters inverted indexes
      ncentroids = 50
      M = 4
  
      ev = Randu10kUnbalanced()
      d = ev.d
      quantizer = faiss.IndexFlatL2(d)
      index = faiss.IndexIVFPQ(quantizer, d, ncentroids, M, 8)
      index.nprobe = 12
  
      res = ev.launch("IVFPQ", index)
      e_ivfpq = ev.evalres(res)
  
      quantizer = faiss.IndexFlatL2(d)
      index_ivfpq = faiss.IndexIVFPQ(quantizer, d, ncentroids, M, 8)
      index_ivfpq.nprobe = 12
      opq_matrix = faiss.OPQMatrix(d, M)
      opq_matrix.niter = 10
      index = faiss.IndexPreTransform(opq_matrix, index_ivfpq)
  
      res = ev.launch("O+IVFPQ", index)
      e_oivfpq = ev.evalres(res)
  
      # verify same on OIVFPQ
      for r in 1, 10, 100:
          print(e_oivfpq[r], e_ivfpq[r])
          assert e_oivfpq[r] >= e_ivfpq[r]
  
imports: from __future__ import absolute_import, division, print_function
  import unittest
  import faiss
  import numpy
  from common_faiss_tests import Randu10k, get_dataset_2, Randu10kUnbalanced
label_desc: Use image node_id 2 for calling the OPQRelativeAccuracy obj's underlying member method code with example usage: obj.test_OIVFPQ() without return types