input: Write a python function to classify fruits using the nltk NaiveBayesClassifier and return the accuracy of the classifier.
  assert classify_fruits(["apple", "orange", "banana", "mango", "strawberry", "peach"], ["APPLE", "ORANGE", "BANANA", "MANGO", "STRAWBERRY", "PEACH"]) > 0
  assert classify_fruits(["kiwi", "grape", "pineapple"], ["KIWI", "GRAPE", "PINEAPPLE"]) > 0
output: def classify_fruits(train_fruits, test_fruits):
      import nltk
      from nltk.classify import NaiveBayesClassifier
      from nltk.classify.util import accuracy
      
      def fruit_features(word):
          return {'last_letter': word[-1]}
      
      # Prepare training data
      train_set = [(fruit_features(fruit), fruit) for fruit in train_fruits]
      
      # Train the NaiveBayesClassifier
      classifier = NaiveBayesClassifier.train(train_set)
      
      # Prepare test data
      test_set = [(fruit_features(fruit), fruit) for fruit in test_fruits]
      
      # Calculate accuracy
      acc = accuracy(classifier, test_set)
      
      return acc