code: def test_NSG_neighbors(self):
      # FIXME number of elements to add should be >> 100
      ds = datasets.SyntheticDataset(32, 0, 200, 10)
      index = faiss.index_factory(ds.d, "NSG")
      index.add(ds.get_database())
      neighbors = inspect_tools.get_NSG_neighbors(index.nsg)
      # neighbors should be either valid indexes or -1
      np.testing.assert_array_less(-2, neighbors)
      np.testing.assert_array_less(neighbors, ds.nb)
  
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 4 for calling the TestInspect obj's underlying member method code with example usage: obj.test_NSG_neighbors() without return types