code: def evaluate(index):
      # for timing with a single core
      # faiss.omp_set_num_threads(1)
  
      t0 = time.time()
      D, I = index.search(xq, k)
      t1 = time.time()
  
      missing_rate = (I == -1).sum() / float(k * nq)
      recall_at_1 = (I == gt[:, :1]).sum() / float(nq)
      print(
          "\t %7.3f ms per query, R@1 %.4f, missing rate %.4f"
          % ((t1 - t0) * 1000.0 / nq, recall_at_1, missing_rate)
      )
  
imports: import time
  import sys
  import numpy
  import faiss
label_desc: Use image node_id 1 for calling a global function with example usage: evaluate(index) without return types