input: Write a function to create a Python neural network model that takes in a given trajectory of stock prices and predicts the stock price for the next day. Return the model so that further predictions can be made using it. If the input list has less than 7 elements, raise an error.
  assert create_model([10, 10.4, 10.5, 10.6, 10.7, 10.9, 11])==None # No assertions for model objects, but this ensures the function can run without errors
  assert create_model([10, 10.4, 10.5, 10.6, 10.7, 10.9])==No prediction possible, the input list needs exactly 7 elements
output: 
  import tensorflow as tf
  from tensorflow.keras.models import Sequential
  from tensorflow.keras.layers import Dense
  
  def create_model(stock_prices):
      if len(stock_prices) < 7:
          raise ValueError("No prediction possible, the input list needs exactly 7 elements")
      
      model = Sequential([
          Dense(10, input_shape=(7,), activation='relu'),
          Dense(1)
      ])
      
      model.compile(optimizer='adam', loss='mse')
      model.fit(tf.expand_dims(stock_prices, axis=0), [[stock_prices[-1]]], epochs=10)
      
      return model
  