code: def test_id_remap_idmap(self):
      # reference: index without remapping
  
      index = faiss.IndexPQ(d, 8, 8)
      k = 10
      index.train(xt)
      index.add(xb)
      _Dref, Iref = index.search(xq, k)
  
      # try a remapping
      ids = np.arange(nb)[::-1].copy().astype("int64")
  
      sub_index = faiss.IndexPQ(d, 8, 8)
      index2 = faiss.IndexIDMap(sub_index)
  
      index2.train(xt)
      index2.add_with_ids(xb, ids)
  
      _D, I = index2.search(xq, k)
  
      assert np.all(I == nb - 1 - Iref)
  
file_path: faiss/tests/test_meta_index.py
imports: import os
  import numpy
  import faiss
  import unittest
  from common_faiss_tests import Randu10k
  from faiss.contrib.datasets import SyntheticDataset
label_desc: Use image node_id 1 for calling the IDRemap obj's underlying member method code with example usage: obj.test_id_remap_idmap() without return types