code: def _coarse_quantize(self, index_ivf, xq, nprobe):
      assert nprobe <= index_ivf.quantizer.ntotal
      quantizer = faiss.index_cpu_to_all_gpus(index_ivf.quantizer)
      bs = 100_000
      nq = len(xq)
      q_assign = np.empty((nq, nprobe), dtype="int32")
      for i0 in trange(0, nq, bs):
          i1 = min(nq, i0 + bs)
          _, q_assign_i = quantizer.search(xq[i0:i1], nprobe)
          q_assign[i0:i1] = q_assign_i
      return q_assign
  
imports: import faiss
  import numpy
  import os
  from tqdm import tqdm, trange
  import sys
  import logging
  from faiss.contrib.ondisk import merge_ondisk
  from faiss.contrib.big_batch_search import big_batch_search
  from faiss.contrib.exhaustive_search import knn_ground_truth
  from faiss.contrib.evaluation import knn_intersection_measure
  from utils import get_intersection_cardinality_frequencies, margin, is_pretransform_index
  from dataset import create_dataset_from_oivf_config
label_desc: Use image node_id 16 for calling the OfflineIVF obj's underlying member method code with example usage: obj._coarse_quantize(index_ivf, xq, nprobe) and returns: q_assign