input: Write a function to classify text documents into two classes: positive and negative using the Naive Bayes classifier from the NLTK library. If the text is classified as positive return 'positive', otherwise return 'negative'. The function should handle a single piece of text as input.
  
  
  import nltk
  from nltk.classify import NaiveBayesClassifier
  
  def label_words(words):
      return dict([(word, True) for word in words])
  
  positiveText = "This is a great movie!"
  negativeText = "This movie was terrible"
  
  positive_tokens = nltk.word_tokenize(positiveText)
  negative_tokens = nltk.word_tokenize(negativeText)
  
  positive_data = [(label_words(positive_tokens), 'positive')]
  negative_data = [(label_words(negative_tokens), 'negative')]
  
  train_data = positive_data + negative_data
  classifier = NaiveBayesClassifier.train(train_data)
  
  def classify_text(text):
      tokens = nltk.word_tokenize(text)
      result = classifier.classify(label_words(tokens))
      return result
  
  assert classify_text("This movie was ok") == 'positive'
  assert classify_text("This movie was amazing") == 'positive'
  assert classify_text("This movie was terrible") == 'negative'
  assert classify_text("I didn't like this movie") == 'negative'
  assert classify_text("") == 'negative'
  
output: def classify_text(text):
      tokens = nltk.word_tokenize(text)
      result = classifier.classify(label_words(tokens))
      return result