class_docstr: Builds a faiss index from a data store containing stored keys (i.e., decoder hidden states for k-NN-based MT).
  
  :param config: a KNNConfig object containing the index configuration information
  :param use_gpu: build index on a gpu
  :param device_id: device id if building index on gpu
code: def __init__(
      self, config: KNNConfig, use_gpu: bool = False, device_id: int = 0
  ):
      utils.check_import_faiss()  # faiss will definitely be used for this class, so check here
      self.config = config
      self.use_gpu = use_gpu
      self.device_id = device_id
  
imports: from dataclasses import dataclass
  import logging
  import numpy
  import os
  import shutil
  from typing import Optional
  from .None import arguments
  from sockeye import config, utils, constants
  from sockeye.log import setup_main_logger
label_desc: Use image node_id 1 to create a new FaissIndexBuilder object  with example: obj = FaissIndexBuilder(config, use_gpu, device_id)