class_docstr: NGT: Neighborhood Graph and Tree for Indexing High-dimensional Data
    NGT provides the functionality of searching for approximate nearest neighbors in high-dimensional data.
  
  Example:
  ```python
    from ngt import base as ngt
    import random
  
    dim = 10
    objects = []
    for i in range(0, 100) :
        vector = random.sample(range(100), dim)
        objects.append(vector)
  
    query = objects[0]
    index = ngt.Index.create(b"tmp", dim)
    index.insert(objects)
    # You can also insert objects from a file like this.
    # index.insert_from_tsv('list.dat')
  
    index.save()
    # You can load the saved index like this.
    # index = ngt.Index(b"tmp")
  
    result = index.search(query, 3)
  
    for i, o in enumerate(result) :
        print(str(i) + ": " + str(o.id) + ", " + str(o.distance))
        object = index.get_object(o.id)
        print(object)
  ```
class_docstr_tok: ["NGT",":","Neighborhood","Graph","and","Tree","for","Indexing","High-dimensional","Data","NGT","provides","the","functionality","of","searching","for","approximate","nearest","neighbors","in","high-dimensional","data",".","Example",":","``","`","python","from","ngt","import","base","as","ngt","import","random","dim","=","10","objects","=","[","]","for","i","in","range","(","0",",","100",")",":","vector","=","random.sample","(","range","(","100",")",",","dim",")","objects.append","(","vector",")","query","=","objects","[","0","]","index","=","ngt.Index.create","(","b","''","tmp","''",",","dim",")","index.insert","(","objects",")","#","You","can","also","insert","objects","from","a","file","like","this",".","#","index.insert_from_tsv","(","'list.dat","'",")","index.save","(",")","#","You","can","load","the","saved","index","like","this",".","#","index","=","ngt.Index","(","b","''","tmp","''",")","result","=","index.search","(","query",",","3",")","for","i",",","o","in","enumerate","(","result",")",":","print","(","str","(","i",")","+","``",":","``","+","str","(","o.id",")","+","``",",","``","+","str","(","o.distance",")",")","object","=","index.get_object","(","o.id",")","print","(","object",")","``","`"]
code: def _check_error_obj(status, error):
      if status is None:
          message = Index.__ngt.ngt_get_error_string(error)
          Index.__ngt.ngt_clear_error_string(error)
          raise NativeError(message)
  
imports: from ctypes import Structure, POINTER, c_char, c_uint, c_uint8, c_void_p, c_char_p, c_int, c_double, c_float, cdll
  import ctypes.util
  import csv
label_desc: Use image node_id 3 for calling the Index obj's underlying member method code with example usage: obj._check_error_obj(status, error) without return types