code: def __init__(
      self,
      reset_before=True,
      reset_after=True,
      index_init_fn=None,
      gpus=None,
  ):
      self.reset()
      self.reset_before = reset_before
      self.reset_after = reset_after
      self.index_init_fn = (
          faiss.IndexFlatL2 if index_init_fn is None else index_init_fn
      )
      if gpus is not None:
          if not isinstance(gpus, (list, tuple)):
              raise TypeError("gpus must be a list")
          if len(gpus) < 1:
              raise ValueError("gpus must have length greater than 0")
      self.gpus = gpus
  
imports: import numpy
  import torch
  from ..distances import BatchedDistance, CosineSimilarity
  from .None import common_functions
label_desc: Use image node_id 1 to create a new FaissKNN object  with example: obj = FaissKNN(reset_before, reset_after, index_init_fn, gpus)