input: Write a function to classify text documents into two classes: positive and negative using the NaiveBayesClassifier from the nltk library. The function should tokenize the input text, label the words, and train a classifier using the provided positive and negative examples. It should then classify a new text into either the positive or negative class.
  
  import nltk
  from nltk.classify import NaiveBayesClassifier 
  
  def label_words(words): 
      return dict([(word, True) for word in words]) 
  
  def classify_text(positiveText, negativeText, newText):
      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) 
        
      return classifier.classify(label_words(nltk.word_tokenize(newText)))
  
  assert classify_text("This is a great movie!", "This movie was terrible", "This movie was ok")=='positive'
output: def classify_text(positiveText, negativeText, newText):
      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) 
        
      return classifier.classify(label_words(nltk.word_tokenize(newText)))