input: Write a function to classify text documents into two classes: positive and negative using a NaiveBayesClassifier from nltk. The function should take a text string as input and return 'positive' if the text is classified as positive and 'negative' if the text is classified as negative. If the input text is empty, the function should return 'neutral'.
  
  assert classify_text("This is a great movie!") == 'positive'
  assert classify_text("This movie was terrible") == 'negative'
  assert classify_text("This movie was ok") == 'positive'
  assert classify_text("") == 'neutral'
output: def classify_text(text):
      if not text:
          return 'neutral'
      from nltk.classify import NaiveBayesClassifier
      from nltk.corpus import movie_reviews
      from nltk.tokenize import word_tokenize
      import random
  
      def format_sentence(sent):
          return {word: True for word in word_tokenize(sent)}
  
      pos_reviews = []
      for fileid in movie_reviews.fileids('pos'):
          pos_reviews.append([format_sentence(movie_reviews.raw(fileid)), 'positive'])
  
      neg_reviews = []
      for fileid in movie_reviews.fileids('neg'):
          neg_reviews.append([format_sentence(movie_reviews.raw(fileid)), 'negative'])
  
      training_set = pos_reviews + neg_reviews
      random.shuffle(training_set)
  
      classifier = NaiveBayesClassifier.train(training_set)
      return classifier.classify(format_sentence(text))