code: def test_ivf_reconstruction(self):
      d = self.xq.shape[1] * 8
      quantizer = faiss.IndexBinaryFlat(d)
      index = faiss.IndexBinaryIVF(quantizer, d, 8)
      index.cp.min_points_per_centroid = 5  # quiet warning
      index.nprobe = 4
      index.train(self.xt)
  
      index.add(self.xb)
      index.set_direct_map_type(faiss.DirectMap.Array)
  
      for i in range(0, len(self.xb), 13):
          np.testing.assert_array_equal(
              index.reconstruct(i), self.xb[i]
          )
  
      # try w/ hashtable
      index = faiss.IndexBinaryIVF(quantizer, d, 8)
      rs = np.random.RandomState(123)
      ids = rs.choice(10000, size=len(self.xb), replace=False).astype(
          np.int64
      )
      index.add_with_ids(self.xb, ids)
      index.set_direct_map_type(faiss.DirectMap.Hashtable)
  
      for i in range(0, len(self.xb), 13):
          np.testing.assert_array_equal(
              index.reconstruct(int(ids[i])), self.xb[i]
          )
  
imports: import os
  import numpy
  import unittest
  import faiss
  from common_faiss_tests import compare_binary_result_lists, make_binary_dataset
label_desc: Use image node_id 6 for calling the TestBinaryIVF obj's underlying member method code with example usage: obj.test_ivf_reconstruction() without return types