input: Write a python function to classify names as male or female using a neural network.
  assert classify_name('Michael') == 'Male'
  assert classify_name('Sarah') == 'Female'
  assert classify_name('John') == 'Male'
output: def classify_name(name):
      import numpy as np
      from sklearn.feature_extraction.text import CountVectorizer
      from sklearn.neural_network import MLPClassifier
  
      # Sample training data
      names = ['John', 'Jane', 'James', 'Emily', 'Michael', 'Jessica', 'David', 'Sarah']
      labels = ['Male', 'Female', 'Male', 'Female', 'Male', 'Female', 'Male', 'Female']
  
      # Vectorize names
      vectorizer = CountVectorizer(analyzer='char', ngram_range=(2, 2))
      X = vectorizer.fit_transform(names)
      
      # Train the neural network
      clf = MLPClassifier(max_iter=1000)
      clf.fit(X, labels)
      
      # Vectorize the input name
      X_test = vectorizer.transform([name])
      
      # Predict and return the label
      return clf.predict(X_test)[0]