code: def get_all_documents(small_test=2, n_jobs=None, use_views=True):
      print("DO get all wiki docs: %s" % small_test, flush=True)
      index_filename, wiki_filename = get_wiki_filenames()
      start_bytes = get_start_bytes(index_filename)
      end_bytes = start_bytes[1:]
      start_bytes = start_bytes[:-1]
  
      if small_test:
          start_bytes = start_bytes[:small_test]
          end_bytes = end_bytes[:small_test]
          if n_jobs is None:
              n_jobs = 5
      else:
          if n_jobs is None:
              n_jobs = os.cpu_count() // 4
  
      # default loky backend leads to name space conflict problems
      return_file = True  # large return from joblib hangs
      documents = Parallel(
          n_jobs=n_jobs, verbose=10, backend="multiprocessing"
      )(
          delayed(get_one_chunk)(
              wiki_filename,
              start_byte,
              end_byte,
              return_file=return_file,
              use_views=use_views,
          )
          for start_byte, end_byte in zip(start_bytes, end_bytes)
      )
      if return_file:
          # then documents really are files
          files = documents.copy()
          documents = []
          for fil in files:
              with open(fil, "rb") as f:
                  documents.extend(pickle.load(f))
              os.remove(fil)
      else:
          from functools import reduce
          from operator import concat
  
          documents = reduce(concat, documents)
      assert isinstance(documents, list)
  
      print("DONE get all wiki docs", flush=True)
      return documents
  
imports: import ast
  import glob
  import pickle
  import uuid
  from typing import List, Optional
  import os
  import bz2
  import csv
  import numpy
  import pandas
  import pytest
  from matplotlib import pyplot
  from langchain.docstore.document import Document
  from langchain.document_loaders import MWDumpLoader
  from joblib import Parallel, delayed
label_desc: Use image node_id 8 for calling a global function with example usage: get_all_documents(small_test, n_jobs, use_views) and returns: documents