input: Write a function to implement an AI-based system in Python for predicting stock market movements by splitting a given dataset into training and testing data, building a deep learning model using TensorFlow and Keras, and evaluating the model on the test data. The function should return the evaluation score of the model.
  
  
  def predict_stock_movements(data, model_input_shape=(1,), batch_size=64, epochs=20):
      #import necessary libraries
      import pandas as pd
      import numpy as np
      import tensorflow as tf
      from tensorflow.keras.layers import Dense
      from tensorflow.keras.models import Sequential
  
      #split data into train and test data
      X_train = data.iloc[:, 0]  #Choosing the independent variable 
      y_train = data.iloc[:, 1]  #Choosing the dependent variable
      X_test = data.iloc[:, 0]  #Choosing the independent variable 
      y_test = data.iloc[:, 1]  #Choosing the dependent variable
  
      #Build a deep learning model
      model = Sequential()
      model.add(Dense(64, input_shape=model_input_shape, activation='relu'))
      model.add(Dense(128, activation='relu'))
      model.add(Dense(64, activation='relu'))
      model.add(Dense(1))
  
      #compile the model
      model.compile(optimizer='adam', loss='mse', metrics=['mse'])
  
      #train the model
      model.fit(X_train, y_train, batch_size=batch_size, epochs=epochs, validation_data=(X_test, y_test))
  
      #Evaluate the model
      score = model.evaluate(X_test, y_test, verbose=0)
      return score
  
  
  
  assert predict_stock_movements(pd.DataFrame({'X': [1, 2, 3], 'y': [1, 4, 9]})) == [8, 8]
  assert predict_stock_movements(pd.DataFrame({'X': [0, 1, 2], 'y': [0, 1, 4]})) == [4, 4]
  assert predict_stock_movements(pd.DataFrame({'X': [3, 5, 7], 'y': [9, 25, 49]})) == [784, 784]
  assert predict_stock_movements(pd.DataFrame({'X': [], 'y': []})) == [0, 0]
  assert predict_stock_movements(pd.DataFrame({'X': [1], 'y': [1]})) == [0, 0]
  
output: def predict_stock_movements(data, model_input_shape=(1,), batch_size=64, epochs=20):
      import pandas as pd
      import numpy as np
      import tensorflow as tf
      from tensorflow.keras.layers import Dense
      from tensorflow.keras.models import Sequential
  
      X_train = data.iloc[:, 0].values.reshape(-1, 1)
      y_train = data.iloc[:, 1].values
      X_test = data.iloc[:, 0].values.reshape(-1, 1)
      y_test = data.iloc[:, 1].values
  
      model = Sequential()
      model.add(Dense(64, input_shape=model_input_shape, activation='relu'))
      model.add(Dense(128, activation='relu'))
      model.add(Dense(64, activation='relu'))
      model.add(Dense(1))
  
      model.compile(optimizer='adam', loss='mse', metrics=['mse'])
  
      model.fit(X_train, y_train, batch_size=batch_size, epochs=epochs, validation_data=(X_test, y_test), verbose=0)
  
      score = model.evaluate(X_test, y_test, verbose=0)
      return score