input: Write a python function to preprocess IMDB dataset for LSTM model training.
  assert preprocess_imdb_data() == ((train_data, train_labels), (test_data, test_labels))
  assert isinstance(train_data, np.ndarray)
  assert isinstance(test_data, np.ndarray)
output: def preprocess_imdb_data():
      import numpy as np
      from tensorflow.keras.datasets import imdb
      from tensorflow.keras.preprocessing.sequence import pad_sequences
  
      # Load the IMDB dataset
      (train_data, train_labels), (test_data, test_labels) = imdb.load_data(num_words=10000)
  
      # Pad the sequences to ensure uniform length
      max_length = 256
      train_data = pad_sequences(train_data, maxlen=max_length)
      test_data = pad_sequences(test_data, maxlen=max_length)
  
      return (train_data, train_labels), (test_data, test_labels)