code: def split_documents(documents):
      """Split documents into passages"""
      titles, texts = [], []
      for title, text in zip(documents["title"], documents["text"]):
          if text is not None:
              for passage in split_text(text):
                  titles.append(title if title is not None else "")
                  texts.append(passage)
      return {"title": titles, "text": texts}
  
file_path: transformers/examples/research_projects/rag-end2end-retriever/kb_encode_utils.py
imports: import os
  from functools import partial
  from glob import glob
  import faiss
  from datasets import Features, Sequence, Value, concatenate_datasets, load_dataset, load_from_disk
  from transformers import DPRContextEncoder, DPRContextEncoderTokenizerFast
label_desc: Use image node_id 2 for calling a global function with example usage: split_documents(documents) and returns: dict