code: # Debug stuff
  #import os
  #import readline
  #print("Current Working Directory:", os.getcwd())
  #env_var = os.getenv('OPENAI_API_KEY')
  #print(env_var)
  
  # Sets llama-index
  import logging
  import sys
  
  logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
  logging.getLogger().addHandler(logging.StreamHandler(stream=sys.stdout))
  
  import os.path
  from llama_index import (
      VectorStoreIndex,
      SimpleDirectoryReader,
      StorageContext,
      load_index_from_storage,
  )
  
  # check if storage already exists
  PERSIST_DIR = "./python/.storage"
  if not os.path.exists(PERSIST_DIR):
      # load the documents and create the index
      documents = SimpleDirectoryReader("python/data").load_data()
      index = VectorStoreIndex.from_documents(documents)
      # store it for later
      index.storage_context.persist(persist_dir=PERSIST_DIR)
  else:
      # load the existing index
      storage_context = StorageContext.from_defaults(persist_dir=PERSIST_DIR)
      index = load_index_from_storage(storage_context)
  
  # either way we can now query the index
  query_engine = index.as_query_engine()
  response = query_engine.query("What did the author do growing up?")
  print(response)
apis: llama_index.VectorStoreIndex.from_documents llama_index.StorageContext.from_defaults llama_index.load_index_from_storage llama_index.SimpleDirectoryReader
extract_api: [((194, 253), 'logging.basicConfig', 'logging.basicConfig', ([], {'stream': 'sys.stdout', 'level': 'logging.DEBUG'}), '(stream=sys.stdout, level=logging.DEBUG)\n', (213, 253), False, 'import logging\n'), ((285, 325), 'logging.StreamHandler', 'logging.StreamHandler', ([], {'stream': 'sys.stdout'}), '(stream=sys.stdout)\n', (306, 325), False, 'import logging\n'), ((697, 739), 'llama_index.VectorStoreIndex.from_documents', 'VectorStoreIndex.from_documents', (['documents'], {}), '(documents)\n', (728, 739), False, 'from llama_index import VectorStoreIndex, SimpleDirectoryReader, StorageContext, load_index_from_storage\n'), ((882, 935), 'llama_index.StorageContext.from_defaults', 'StorageContext.from_defaults', ([], {'persist_dir': 'PERSIST_DIR'}), '(persist_dir=PERSIST_DIR)\n', (910, 935), False, 'from llama_index import VectorStoreIndex, SimpleDirectoryReader, StorageContext, load_index_from_storage\n'), ((948, 988), 'llama_index.load_index_from_storage', 'load_index_from_storage', (['storage_context'], {}), '(storage_context)\n', (971, 988), False, 'from llama_index import VectorStoreIndex, SimpleDirectoryReader, StorageContext, load_index_from_storage\n'), ((254, 273), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (271, 273), False, 'import logging\n'), ((636, 672), 'llama_index.SimpleDirectoryReader', 'SimpleDirectoryReader', (['"""python/data"""'], {}), "('python/data')\n", (657, 672), False, 'from llama_index import VectorStoreIndex, SimpleDirectoryReader, StorageContext, load_index_from_storage\n')]