class_docstr: An index which can be deserialized from the files built using https://github.com/facebookresearch/DPR. We use
  default faiss index parameters as specified in that repository.
  
  Args:
      vector_size (`int`):
          The dimension of indexed vectors.
      index_path (`str`):
          A path to a *directory* containing index files compatible with [`~models.rag.retrieval_rag.LegacyIndex`]
class_docstr_tok: ["An","index","which","can","be","deserialized","from","the","files","built","using","https",":","\/\/github.com\/facebookresearch\/DPR",".","We","use","default","faiss","index","parameters","as","specified","in","that","repository",".","Args",":","vector_size","(","`","int","`",")",":","The","dimension","of","indexed","vectors",".","index_path","(","`","str","`",")",":","A","path","to","a","*","directory","*","containing","index","files","compatible","with","[","`","~models.rag.retrieval_rag.LegacyIndex","`","]"]
code: def get_doc_dicts(self, doc_ids: np.array):
      doc_list = []
      for doc_ids_i in doc_ids:
          ids = [str(int(doc_id)) for doc_id in doc_ids_i]
          docs = [self.passages[doc_id] for doc_id in ids]
          doc_list.append(docs)
      doc_dicts = []
      for docs in doc_list:
          doc_dict = {}
          doc_dict["title"] = [doc[1] for doc in docs]
          doc_dict["text"] = [doc[0] for doc in docs]
          doc_dicts.append(doc_dict)
      return doc_dicts
  
imports: import os
  import pickle
  import time
  from typing import Iterable, List, Optional, Tuple
  import numpy
  from ...tokenization_utils import PreTrainedTokenizer
  from ...tokenization_utils_base import BatchEncoding
  from ...utils import cached_file, is_datasets_available, is_faiss_available, logging, requires_backends
  from .configuration_rag import RagConfig
  from .tokenization_rag import RagTokenizer
label_desc: Use image node_id 7 for calling the LegacyIndex obj's underlying member method code with example usage: obj.get_doc_dicts(doc_ids) and returns: doc_dicts