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. This model should be implemented using TensorFlow and Keras. If the input is a list of stock prices, the output should be the predicted price for the next day. If the input is an empty list, the function should return None.
  assert predict_next_price([10, 10.4, 10.5, 10.6, 10.7, 10.9, 11])==11.1
  assert predict_next_price([10, 10.4, 10.5, 9.8, 10.7, 10.9, 11])==11.2
  assert predict_next_price([])==None
output: 
  import tensorflow as tf
  from tensorflow.keras.models import Sequential
  from tensorflow.keras.layers import Dense
  
  def predict_next_price(stock_prices):
      if not stock_prices:
          return None
      
      model = Sequential([
          Dense(10, input_shape=(1,), activation='relu'),
          Dense(1)
      ])
      
      model.compile(optimizer='adam', loss='mean_squared_error')
      
      X = tf.constant(stock_prices[:-1], dtype=tf.float32)
      y = tf.constant(stock_prices[1:], dtype=tf.float32)
      
      model.fit(X, y, epochs=100, verbose=0)
      
      last_price = tf.constant([stock_prices[-1]], dtype=tf.float32)
      predicted_price = model.predict(last_price, verbose=0)
      
      return predicted_price[0][0]
  