input: Write a function to evaluate the accuracy of a text classification model using TF-IDF and Naive Bayes.
  assert evaluate_model_accuracy(["sample 1 from AuthorA", "sample 2 from AuthorA", "sample 1 from AuthorB", "sample 2 from AuthorB"], ["AuthorA", "AuthorA", "AuthorB", "AuthorB"]) >= 0.5
  assert evaluate_model_accuracy(["text A1", "text A2", "text B1", "text B2"], ["A", "A", "B", "B"]) <= 1.0
  assert evaluate_model_accuracy(["doc 1", "doc 2", "doc 3", "doc 4"], ["class1", "class1", "class2", "class2"]) >= 0.5
output: def evaluate_model_accuracy(texts, labels):
      from sklearn.feature_extraction.text import TfidfVectorizer
      from sklearn.naive_bayes import MultinomialNB
      from sklearn.model_selection import train_test_split
      from sklearn.metrics import accuracy_score
      
      # Split the data into training and testing sets
      X_train, X_test, y_train, y_test = train_test_split(texts, labels, test_size=0.2, random_state=42)
      
      # Vectorize the text data using TF-IDF
      vectorizer = TfidfVectorizer()
      X_train_tfidf = vectorizer.fit_transform(X_train)
      X_test_tfidf = vectorizer.transform(X_test)
      
      # Train a Naive Bayes classifier
      clf = MultinomialNB()
      clf.fit(X_train_tfidf, y_train)
      
      # Predict the labels for the test set
      y_pred = clf.predict(X_test_tfidf)
      
      # Calculate the accuracy of the model
      accuracy = accuracy_score(y_test, y_pred)
      
      return accuracy