input: Write a python function to classify names by gender using NLTK's NaiveBayesClassifier.
  assert classify_name('Amy') == 'female'
  assert classify_name('Booker') == 'male'
  assert classify_name('Charles') == 'male'
  assert classify_name('Daisy') == 'female'
output: import nltk
  from nltk.classify import NaiveBayesClassifier
  from nltk.corpus import names
  import random
  
  def gender_features(word):
      return {'last_letter': word[-1]}
  
  def classify_name(name):
      nltk.download('names')
      labeled_names = ([(name, 'male') for name in names.words('male.txt')] + 
                       [(name, 'female') for name in names.words('female.txt')])
      random.shuffle(labeled_names)
      featuresets = [(gender_features(n), gender) for (n, gender) in labeled_names]
      train_set = featuresets
      classifier = NaiveBayesClassifier.train(train_set)
      return classifier.classify(gender_features(name))