input: Write a python function to preprocess the training data for a neural network model using TensorFlow. 
  assert preprocess_data(([[1, 2, 3], [4, 5, 6]], [0, 1])) == (tf.keras.preprocessing.sequence.pad_sequences([[1, 2, 3], [4, 5, 6]], maxlen=500), [0, 1])
  assert preprocess_data(([[7, 8, 9], [10, 11, 12]], [1, 0])) == (tf.keras.preprocessing.sequence.pad_sequences([[7, 8, 9], [10, 11, 12]], maxlen=500), [1, 0])
output: import tensorflow as tf
  
  def preprocess_data(data):
      sequences, labels = data
      padded_sequences = tf.keras.preprocessing.sequence.pad_sequences(sequences, maxlen=500)
      return padded_sequences, labels