code: def filter_by_th(self, i):
      th_nbrs = []
      th_dists = []
      nbrs, dists = self.knns[i]
      for n, dist in zip(nbrs, dists):
          if 1 - dist < self.th:
              continue
          th_nbrs.append(n)
          th_dists.append(dist)
      th_nbrs = np.array(th_nbrs)
      th_dists = np.array(th_dists)
      return (th_nbrs, th_dists)
  
file_path: dgl/examples/pytorch/hilander/utils/knn.py
imports: import math
  import multiprocessing
  import os
  import numpy
  from tqdm import tqdm
  from utils import Timer
  from .faiss_search import faiss_search_knn
label_desc: Use image node_id 2 for calling the knn obj's underlying member method code with example usage: obj.filter_by_th(i) and returns: th_nbrs,  th_dists