code: def do_test_compute_GT(self, metric=faiss.METRIC_L2):
      d = 64
      xt, xb, xq = get_dataset_2(d, 0, 10000, 100)
  
      index = faiss.IndexFlat(d, metric)
      index.add(xb)
      Dref, Iref = index.search(xq, 10)
  
      # iterator function on the matrix
  
      def matrix_iterator(xb, bs):
          for i0 in range(0, xb.shape[0], bs):
              yield xb[i0 : i0 + bs]
  
      Dnew, Inew = knn_ground_truth(
          xq, matrix_iterator(xb, 1000), 10, metric
      )
  
      np.testing.assert_array_equal(Iref, Inew)
      # decimal = 4 required when run on GPU
      np.testing.assert_almost_equal(Dref, Dnew, decimal=4)
  
imports: import faiss
  import unittest
  import numpy
  import platform
  import os
  import random
  import tempfile
  from faiss.contrib import datasets
  from faiss.contrib import inspect_tools
  from faiss.contrib import evaluation
  from faiss.contrib import ivf_tools
  from faiss.contrib import clustering
  from faiss.contrib import big_batch_search
  from common_faiss_tests import get_dataset_2
label_desc: Use image node_id 1 for calling the TestComputeGT obj's underlying member method code with example usage: obj.do_test_compute_GT(metric) without return types