input: Write a python function to preprocess stock data for model training.
  assert preprocess_data(pd.DataFrame({'y': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]}), window_size=2)[0].shape == (7, 2, 1)
  assert preprocess_data(pd.DataFrame({'y': [1, 2, 3, 4, 5]}), window_size=1)[0].shape == (2, 1, 1)
  assert preprocess_data(pd.DataFrame({'y': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]}), window_size=3)[1].shape == (2, 3, 1)
output: def preprocess_data(df, window_size):
      import numpy as np
      
      data = df['y'].values
      sequences = []
      for i in range(len(data) - window_size):
          sequences.append(data[i:i+window_size])
      
      sequences = np.array(sequences).reshape(-1, window_size, 1)
      
      return sequences, sequences