class_docstr: computation within one bucket 
class_docstr_tok: ["computation","within","one","bucket"]
code: def block_search(self, xq_l, xb_l, list_ids, k, **extra_args):
      metric_type = self.index.metric_type
      if xq_l.size == 0 or xb_l.size == 0:
          D = I = None
      elif self.method == "index":
          faiss.copy_array_to_vector(xb_l, self.index_help.codes)
          self.index_help.ntotal = len(list_ids)
          D, I = self.index_help.search(xq_l, k)
      elif self.method == "pairwise_distances":
          # TODO implement blockwise to avoid mem blowup
          D = self.pairwise_distances(xq_l, xb_l, metric=metric_type)
          I = None
      elif self.method == "knn_function":
          D, I = self.knn(
              xq_l, xb_l, k, metric=metric_type, **extra_args
          )
  
      return D, I
  
imports: import time
  import pickle
  import os
  import logging
  from multiprocessing.pool import ThreadPool
  import threading
  import _thread
  from queue import Queue
  import traceback
  import datetime
  import numpy
  import faiss
  from faiss.contrib.inspect_tools import get_invlist
label_desc: Use image node_id 2 for calling the BlockComputer obj's underlying member method code with example usage: obj.block_search(xq_l, xb_l, list_ids, k) and returns: D,  I