input: from typing import List
  
  def classify_text(texts: List[str], training_data: List[tuple], new_text: str) -> str:
      """ Classify given text documents into two classes: positive and negative using a 
      Naive Bayes Classifier. The training data should be provided as a list of tuples 
      where each tuple contains a dictionary of labeled words and the corresponding 
      class label ('positive' or 'negative'). The new text is the document to be classified. 
  
      >>> classify_text(["This is a great movie!", "This movie was terrible"], [({'great': True, 'movie': True}, 'positive'), ({'movie': True, 'was': True, 'terrible': True}, 'negative')], "This movie was ok")
      'negative'
      """
output:     from collections import defaultdict
      import math
  
      def calculate_prior_probabilities(training_data):
          total_docs = len(training_data)
          class_counts = defaultdict(int)
          for _, label in training_data:
              class_counts[label] += 1
          return {label: count / total_docs for label, count in class_counts.items()}
  
      def calculate_word_probabilities(training_data):
          word_counts = defaultdict(lambda: defaultdict(int))
          total_words = defaultdict(int)
          for words, label in training_data:
              for word in words:
                  word_counts[label][word] += 1
                  total_words[label] += 1
          return {label: {word: (count + 1) / (total_words[label] + len(word_counts[label])) for word, count in word_counts[label].items()} for label in word_counts}
  
      def classify_document(new_text, word_probabilities, prior_probabilities):
          words = new_text.split()
          scores = {label: math.log(prior) for label, prior in prior_probabilities.items()}
          for label in scores:
              for word in words:
                  if word in word_probabilities[label]:
                      scores[label] += math.log(word_probabilities[label][word])
          return max(scores, key=scores.get)
  
      prior_probabilities = calculate_prior_probabilities(training_data)
      word_probabilities = calculate_word_probabilities(training_data)
      return classify_document(new_text, word_probabilities, prior_probabilities)