input: Write a python function to train a neural network using MLPClassifier from sklearn and make predictions.
  assert (train_and_predict([[0, 0], [0, 1], [1, 0], [1, 1]], [0, 1, 1, 0]) == [0, 1, 1, 0]).all()
  assert (train_and_predict([[1, 1], [1, 0], [0, 1], [0, 0]], [0, 1, 1, 0]) == [0, 1, 1, 0]).all()
output: def train_and_predict(X, y):
      from sklearn.neural_network import MLPClassifier
      import numpy as np
      
      # Initialize the MLPClassifier
      clf = MLPClassifier(max_iter=1000)
      
      # Train the model
      clf.fit(X, y)
      
      # Make predictions
      predictions = clf.predict(X)
      
      return np.array(predictions)