input: Write a python function to train a text mining model using Naive Bayes classifier and test its accuracy using nltk library.
  assert train_and_test_text_classifier(data) > 0.5
output: def train_and_test_text_classifier(data):
      import nltk
      from nltk.corpus import movie_reviews
      import random
      from nltk.classify import NaiveBayesClassifier
      from nltk.classify.util import accuracy
  
      nltk.download('movie_reviews')
      nltk.download('punkt')
  
      documents = [(list(movie_reviews.words(fileid)), category)
                   for category in movie_reviews.categories()
                   for fileid in movie_reviews.fileids(category)]
      random.shuffle(documents)
  
      all_words = nltk.FreqDist(w.lower() for w in movie_reviews.words())
      word_features = list(all_words)[:2000]
  
      def document_features(document):
          document_words = set(document)
          features = {}
          for word in word_features:
              features[word] = (word in document_words)
          return features
  
      featuresets = [(document_features(d), c) for (d, c) in documents]
      train_set, test_set = featuresets[100:], featuresets[:100]
      classifier = NaiveBayesClassifier.train(train_set)
  
      return accuracy(classifier, test_set)