code: def get_NSG_neighbors(nsg):
      """get the neighbor list for the vectors stored in the NSG structure, as
      a N-by-K matrix of indices"""
      graph = nsg.get_final_graph()
      neighbors = np.zeros((graph.N, graph.K), dtype="int32")
      faiss.memcpy(
          faiss.swig_ptr(neighbors), graph.data, neighbors.nbytes
      )
      return neighbors
  
file_path: faiss/contrib/inspect_tools.py
imports: import numpy
  import faiss
label_desc: Use image node_id 9 for calling a global function with example usage: get_NSG_neighbors(nsg) and returns: neighbors