input: Write a python function to train a neural network using sklearn's MLPClassifier on XOR gate data and make predictions.
  assert train_and_predict([[1, 1]]) == [0]
  assert train_and_predict([[0, 1]]) == [1]
  assert train_and_predict([[1, 0]]) == [1]
  assert train_and_predict([[0, 0]]) == [0]
output: def train_and_predict(X):
      from sklearn.neural_network import MLPClassifier
  
      # XOR gate data
      X_train = [[0, 0], [0, 1], [1, 0], [1, 1]]
      y_train = [0, 1, 1, 0]
  
      # Initialize the MLPClassifier
      clf = MLPClassifier(hidden_layer_sizes=(2,), max_iter=10000, random_state=1)
  
      # Train the model
      clf.fit(X_train, y_train)
  
      # Make predictions
      return clf.predict(X).tolist()