code: def insert(self, insert_index, val):
          
  
          def prevent_duplicates(index, val):
              raise BaseLunrException("Duplicate index")
  
          self.upsert(insert_index, val, prevent_duplicates)
docs: Inserts an element at an index within the vector.
  
          Does not allow duplicates, will throw an error if there is already an
          entry for this index.