input: 
  def classify_text(text: str) -> str:
      """ Classify the given text into 'positive' or 'negative' based on predefined training data.
      The function uses a NaiveBayesClassifier from the nltk library.
      
      >>> classify_text("This is a great movie!")
      'positive'
      >>> classify_text("This movie was terrible")
      'negative'
      """
  
output:     from nltk.classify import NaiveBayesClassifier
      from nltk.corpus import subjectivity
      from nltk.sentiment import SentimentAnalyzer
      from nltk.sentiment.util import extract_unigram_feats
  
      # Load training data
      nltk.download('subjectivity')
      nltk.download('vader_lexicon')
      subj_docs = [(sent, 'subj') for sent in subjectivity.sents(categories='subj')]
      obj_docs = [(sent, 'obj') for sent in subjectivity.sents(categories='obj')]
      train_data = subj_docs + obj_docs
  
      # Train the classifier
      sentim_analyzer = SentimentAnalyzer()
      all_words_neg = sentim_analyzer.all_words([mark_negation(doc) for doc in train_data])
      unigram_feats = sentim_analyzer.unigram_word_feats(all_words_neg, min_freq=4)
      sentim_analyzer.add_feat_extractor(extract_unigram_feats, unigrams=unigram_feats)
      training_set = sentim_analyzer.apply_features(train_data)
      trainer = NaiveBayesClassifier.train
      classifier = sentim_analyzer.train(trainer, training_set)
  
      # Classify the input text
      features = sentim_analyzer.apply_features([text])
      result = classifier.classify(features[0])
      return 'positive' if result == 'subj' else 'negative'