class_docstr: Index file for fast KNN mapping.
  It is built by `build_knn_map_index.py` script.
  It contains a big matrix of shape (chunk_id, K neighbors)
  where `chunk_id` are all the chunk ids in the RETRO training data.
  E.g. the KNN neighbor chunk ids in the retrieval data for ith chunk id in the training data
  is self.knn_map[i].
  This index can hold partial maps used for building sharding index.
class_docstr_tok: ["Index","file","for","fast","KNN","mapping",".","It","is","built","by","`","build_knn_map_index.py","`","script",".","It","contains","a","big","matrix","of","shape","(","chunk_id",",","K","neighbors",")","where","`","chunk_id","`","are","all","the","chunk","ids","in","the","RETRO","training","data",".","E.g",".","the","KNN","neighbor","chunk","ids","in","the","retrieval","data","for","ith","chunk","id","in","the","training","data","is","self.knn_map","[","i","]",".","This","index","can","hold","partial","maps","used","for","building","sharding","index","."]
code: def __del__(self):
      self._bin_buffer_mmap._mmap.close()
      del self._bin_buffer_mmap
  
imports: import os
  import shutil
  import struct
  from functools import lru_cache
  from itertools import accumulate
  from typing import List
  import numpy
  import torch
  from nemo.utils import logging
label_desc: Use image node_id 4 for calling the KNNIndex obj's underlying member method code with example usage: obj.__del__() without return types