input: from typing import List, Tuple
  
  def classify_text(texts: List[Tuple[str, str]]) -> str:
      """ Given a list of tuples where each tuple contains a text document and its corresponding label ('positive' or 'negative'),
      tokenize the documents, label the words, and train a Naive Bayes classifier. Then, classify a new text document and return the prediction.
      >>> classify_text([("This is a great movie!", 'positive'), ("This movie was terrible", 'negative')])
      'negative'
      """
      import nltk
      from nltk.classify import NaiveBayesClassifier 
      
      def label_words(words): 
          return dict([(word, True) for word in words]) 
  
      positive_data = []
      negative_data = []
  
      for text, label in texts:
          tokens = nltk.word_tokenize(text)
          if label == 'positive':
              positive_data.append((label_words(tokens), 'positive'))
          else:
              negative_data.append((label_words(tokens), 'negative'))
  
      train_data = positive_data + negative_data 
      classifier = NaiveBayesClassifier.train(train_data) 
  
      # classify a new document 
      new_text = "This movie was ok"
      return classifier.classify(label_words(nltk.word_tokenize(new_text)))
output:     import nltk
      from nltk.classify import NaiveBayesClassifier 
      
      def label_words(words): 
          return dict([(word, True) for word in words]) 
  
      positive_data = []
      negative_data = []
  
      for text, label in texts:
          tokens = nltk.word_tokenize(text)
          if label == 'positive':
              positive_data.append((label_words(tokens), 'positive'))
          else:
              negative_data.append((label_words(tokens), 'negative'))
  
      train_data = positive_data + negative_data 
      classifier = NaiveBayesClassifier.train(train_data) 
  
      # classify a new document 
      new_text = "This movie was ok"
      return classifier.classify(label_words(nltk.word_tokenize(new_text)))