docstr: test IndexNSG.reset()
docstr_tok: ["test","IndexNSG.reset","(",")"]
code: def test_reset(self):
      """test IndexNSG.reset()"""
      d = self.xq.shape[1]
      metrics = {
          faiss.METRIC_L2: "L2",
          faiss.METRIC_INNER_PRODUCT: "IP",
      }
  
      metric = faiss.METRIC_L2
      flat_index = faiss.IndexFlat(d, metric)
      flat_index.add(self.xb)
      Dref, Iref = flat_index.search(self.xq, 1)
  
      index = faiss.IndexNSGFlat(d, 16)
      index.verbose = True
      index.GK = 32
  
      index.add(self.xb)
      Dnsg, Insg = index.search(self.xq, 1)
      recalls = (Iref == Insg).sum()
      print("metric: {}, nb equal: {}".format(metrics[metric], recalls))
      self.assertGreaterEqual(recalls, 475)
      self.subtest_connectivity(index, self.xb.shape[0])
  
      index.reset()
      index.add(self.xb)
      Dnsg, Insg = index.search(self.xq, 1)
      recalls = (Iref == Insg).sum()
      print("metric: {}, nb equal: {}".format(metrics[metric], recalls))
      self.assertGreaterEqual(recalls, 475)
      self.subtest_connectivity(index, self.xb.shape[0])
  
imports: import numpy
  import unittest
  import faiss
  import tempfile
  import os
  from common_faiss_tests import get_dataset_2
label_desc: Use image node_id 14 for calling the TestNSG obj's underlying member method code with example usage: obj.test_reset() without return types