input: Write a function to create and train a deep learning model for predicting stock market movements using the given data. The function should import necessary libraries, read the data from a CSV file, split the data into training and testing sets, build a neural network model with specified layers, compile and train the model, and finally evaluate the model. The function should return the evaluation score.
  assert predict_stock_movements("data.csv")==score value
  assert predict_stock_movements("empty_data.csv")==nan
output: def predict_stock_movements(csv_file):
      import pandas as pd
      import numpy as np
      from sklearn.model_selection import train_test_split
      from tensorflow.keras.models import Sequential
      from tensorflow.keras.layers import Dense
      from tensorflow.keras.optimizers import Adam
  
      try:
          data = pd.read_csv(csv_file)
      except pd.errors.EmptyDataError:
          return float('nan')
  
      X = data.iloc[:, :-1].values
      y = data.iloc[:, -1].values
  
      X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
  
      model = Sequential()
      model.add(Dense(64, input_dim=X_train.shape[1], activation='relu'))
      model.add(Dense(32, activation='relu'))
      model.add(Dense(1, activation='sigmoid'))
  
      model.compile(optimizer=Adam(learning_rate=0.001), loss='binary_crossentropy', metrics=['accuracy'])
      model.fit(X_train, y_train, epochs=10, batch_size=32, verbose=0)
  
      _, score = model.evaluate(X_test, y_test, verbose=0)
      return score