input: Write a python function to load and preprocess stock data for LSTM model training.
  assert preprocess_data('FB.csv').shape == (some_expected_shape)
  assert preprocess_data('AAPL.csv').min() == 0
  assert preprocess_data('GOOG.csv').max() == 1
output: def preprocess_data(file_path):
      import pandas as pd
      from sklearn.preprocessing import MinMaxScaler
      
      # Load the stock data
      df = pd.read_csv(file_path)
      
      # Ensure data is sorted by date
      df['Date'] = pd.to_datetime(df['Date'])
      df.sort_values('Date', inplace=True)
      
      # Only keep the 'Close' price
      close_prices = df['Close'].values.reshape(-1, 1)
      
      # Normalize the data to be in the range [0, 1]
      scaler = MinMaxScaler(feature_range=(0, 1))
      scaled_data = scaler.fit_transform(close_prices)
      
      return scaled_data