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
docstr: Add items to the index (must call `init_faiss_index` first).
docstr_tok: ["Add","items","to","the","index","(","must","call","`","init_faiss_index","`","first",")","."]
code: def add_items(self, index, keys: np.ndarray):
      """Add items to the index (must call `init_faiss_index` first)."""
      item_count, key_dim = keys.shape
      assert key_dim == self.config.dimension
  
      index.add(keys.astype(np.float32))
  
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 3 for calling the FaissIndexBuilder obj's underlying member method code with example usage: obj.add_items(index, keys) without return types