class_docstr: since it has a distance computer, HNSW should work 
code: def test_hnsw(self):
      d = 10
      nb = 1000
      nq = 100
      nt = 0
      xt, xb, xq = get_dataset_2(d, nt, nb, nq)
  
      mt = faiss.METRIC_L1
  
      index = faiss.IndexHNSW(faiss.IndexFlat(d, mt))
      index.add(xb)
  
      D, I = index.search(xq, 10)
  
      dis = faiss.pairwise_distances(xq, xb, mt)
  
      for q in range(nq):
          assert np.all(D[q] == dis[q, I[q]])
  
imports: import numpy
  import faiss
  import unittest
  from common_faiss_tests import get_dataset_2
  import scipy.spatial.distance
label_desc: Use image node_id 1 for calling the TestHNSW obj's underlying member method code with example usage: obj.test_hnsw() without return types