class_docstr: Combo Faiss Retrieval Flask resource.
  The PUT method is to get KNN tokens, add new chunks, reset index.
code: def get_knn(
      self, query: Union[List[str], str, torch.Tensor], neighbors
  ):
      weights = self.weight_container[0]
      if neighbors == 0:
          return self.retrieval_services[0].get_knn(query, 0)
      total_neighbors = 0
      results = []
      for i, service in enumerate(self.retrieval_services):
          k = int(neighbors * weights[i])
          if i == len(self.retrieval_services) - 1:
              k = neighbors - total_neighbors
          total_neighbors += k
          if k == 0:
              # empty, skip it
              continue
          result = service.get_knn(query, k)
          results.append(result)
      return np.concatenate(results, axis=1)
  
imports: import pickle
  import threading
  from typing import List, Union
  import faiss
  import numpy
  import torch
  from flask import Flask, jsonify, request
  from flask_restful import Api, Resource
  from nemo.collections.common.tokenizers.tokenizer_spec import TokenizerSpec
  from nemo.collections.nlp.modules.common.megatron.retrieval_services.retrieval_service import DynamicFaissRetrievalService, FaissRetrievalService
  from nemo.collections.nlp.modules.common.megatron.retrieval_services.util import lock
label_desc: Use image node_id 5 for calling the ComboRetrievalResource obj's underlying member method code with example usage: obj.get_knn(query, neighbors) and returns: np, self