input: Write a python function to create an inverted index from a list of documents.
  assert create_inverted_index(["hello world", "hello"]) == {'hello': [0, 1], 'world': [0]}
  assert create_inverted_index(["a quick brown fox", "jumps over the lazy dog", "a lazy dog jumps"]) == {'a': [0, 2], 'quick': [0], 'brown': [0], 'fox': [0], 'jumps': [1, 2], 'over': [1], 'the': [1], 'lazy': [1, 2], 'dog': [1, 2]}
  assert create_inverted_index(["the quick brown fox", "the quick brown dog"]) == {'the': [0, 1], 'quick': [0, 1], 'brown': [0, 1], 'fox': [0], 'dog': [1]}
output: def create_inverted_index(documents):
      inverted_index = {}
      for idx, doc in enumerate(documents):
          for word in doc.split():
              if word not in inverted_index:
                  inverted_index[word] = []
              if idx not in inverted_index[word]:
                  inverted_index[word].append(idx)
      return inverted_index