code: import os
  from dotenv import load_dotenv
  load_dotenv()
  import s3fs
  
  from llama_index import (
     SimpleDirectoryReader,
     VectorStoreIndex,
     StorageContext,
     load_index_from_storage
  )
  
  
  # load documents
  documents = SimpleDirectoryReader('../../../examples/paul_graham_essay/data/').load_data()
  print(len(documents))
  index = VectorStoreIndex.from_documents(documents)
  
  
  # set up s3fs
  AWS_KEY = os.environ['AWS_ACCESS_KEY_ID']
  AWS_SECRET = os.environ['AWS_SECRET_ACCESS_KEY']
  R2_ACCOUNT_ID = os.environ['R2_ACCOUNT_ID']
  
  assert AWS_KEY is not None and AWS_KEY != ""
  
  s3 = s3fs.S3FileSystem(
     key=AWS_KEY,
     secret=AWS_SECRET,
     endpoint_url=f'https://{R2_ACCOUNT_ID}.r2.cloudflarestorage.com',
     s3_additional_kwargs={'ACL': 'public-read'}
  )
  
  # save index to remote blob storage
  index.set_index_id("vector_index")
  # this is {bucket_name}/{index_name}
  index.storage_context.persist('llama-index/storage_demo', fs=s3)
  
  # load index from s3
  sc = StorageContext.from_defaults(persist_dir='llama-index/storage_demo', fs=s3)
  index2 = load_index_from_storage(sc, 'vector_index')
apis: llama_index.VectorStoreIndex.from_documents llama_index.StorageContext.from_defaults llama_index.load_index_from_storage llama_index.SimpleDirectoryReader
extract_api: [((41, 54), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (52, 54), False, 'from dotenv import load_dotenv\n'), ((329, 371), 'llama_index.VectorStoreIndex.from_documents', 'VectorStoreIndex.from_documents', (['documents'], {}), '(documents)\n', (360, 371), False, 'from llama_index import SimpleDirectoryReader, VectorStoreIndex, StorageContext, load_index_from_storage\n'), ((575, 744), 's3fs.S3FileSystem', 's3fs.S3FileSystem', ([], {'key': 'AWS_KEY', 'secret': 'AWS_SECRET', 'endpoint_url': 'f"""https://{R2_ACCOUNT_ID}.r2.cloudflarestorage.com"""', 's3_additional_kwargs': "{'ACL': 'public-read'}"}), "(key=AWS_KEY, secret=AWS_SECRET, endpoint_url=\n    f'https://{R2_ACCOUNT_ID}.r2.cloudflarestorage.com',\n    s3_additional_kwargs={'ACL': 'public-read'})\n", (592, 744), False, 'import s3fs\n'), ((951, 1026), 'llama_index.StorageContext.from_defaults', 'StorageContext.from_defaults', ([], {'persist_dir': '"""llama-index/storage_demo"""', 'fs': 's3'}), "(persist_dir='llama-index/storage_demo', fs=s3)\n", (979, 1026), False, 'from llama_index import SimpleDirectoryReader, VectorStoreIndex, StorageContext, load_index_from_storage\n'), ((1036, 1079), 'llama_index.load_index_from_storage', 'load_index_from_storage', (['sc', '"""vector_index"""'], {}), "(sc, 'vector_index')\n", (1059, 1079), False, 'from llama_index import SimpleDirectoryReader, VectorStoreIndex, StorageContext, load_index_from_storage\n'), ((220, 286), 'llama_index.SimpleDirectoryReader', 'SimpleDirectoryReader', (['"""../../../examples/paul_graham_essay/data/"""'], {}), "('../../../examples/paul_graham_essay/data/')\n", (241, 286), False, 'from llama_index import SimpleDirectoryReader, VectorStoreIndex, StorageContext, load_index_from_storage\n')]