def __init__(self,
               *,
               claim_embedding_path,
               claim_id_path,
               wiki_embedding_dir,
               n_shards,
               copy_to_tmp,
               device = '/CPU:0',
               batch_size = 256,
               l2_norm=False):
    """Configure index.

    Claim ids and embeddings are related through their position (eg, first
    embedding corresponds to first id).

    Args:
      claim_embedding_path: Path to claim embeddings
      claim_id_path: Path to claim ids
      wiki_embedding_dir: Directory of .npy embedding files
      n_shards: Number of shards to read
      copy_to_tmp: Whether to copy embeddings to tmp (eg, maybe they are on slow
        network file system)
      device: Tensorflow device to use for batched matrix multiplies
      batch_size: Batch size for batched matrix multiplies
      l2_norm: Whether to impose the L2 norm on vectors
    """
    self._claim_embedding_path = claim_embedding_path
    self._claim_id_path = claim_id_path
    self._wiki_embedding_dir = wiki_embedding_dir
    self._n_shards = n_shards
    self._batch_size = batch_size
    self._l2_norm = l2_norm
    self._copy_to_tmp = copy_to_tmp
    self._device = device
    self._wiki_embeddings: Optional[tf.Tensor] = None
    self._key_to_idx: Optional[Dict[IndexKey, int]] = None
    self._idx_to_key: Optional[Dict[int, IndexKey]] = None
    self._claim_embeddings: Optional[tf.Tensor] = None
    self._claim_ids: Optional[tf.Tensor] = None
    self._claim_id_to_idx: Optional[Dict[int, int]] = None
Configure index.

    Claim ids and embeddings are related through their position (eg, first
    embedding corresponds to first id).

    Args:
      claim_embedding_path: Path to claim embeddings
      claim_id_path: Path to claim ids
      wiki_embedding_dir: Directory of .npy embedding files
      n_shards: Number of shards to read
      copy_to_tmp: Whether to copy embeddings to tmp (eg, maybe they are on slow
        network file system)
      device: Tensorflow device to use for batched matrix multiplies
      batch_size: Batch size for batched matrix multiplies
      l2_norm: Whether to impose the L2 norm on vectors
    
language/serene/wiki_index.py