input: 
  from sklearn.pipeline import Pipeline
  from sklearn.model_selection import train_test_split
  from sklearn.feature_extraction.text import TfidfVectorizer
  from sklearn.naive_bayes import GaussianNB
  
  def train_and_evaluate(samples, labels):
      """Train a machine learning model using the given samples and labels, and then evaluate its performance.
      The model first transforms the text data using TfidfVectorizer and then applies a Gaussian Naive Bayes classifier.
      The model is trained using 70% of the data and evaluated on the remaining 30%.
      
      >>> train_and_evaluate(["sample 1 from AuthorA", "sample 2 from AuthorA", "sample 1 from AuthorB", "sample 2 from AuthorB"], 
      ... ["AuthorA", "AuthorA", "AuthorB", "AuthorB"])
      model score: 1.0
      """
      model = Pipeline([
          ('tfidf', TfidfVectorizer()),
          ('clf', GaussianNB())
      ])
      X_train, X_test, y_train, y_test = train_test_split(samples, labels, test_size=0.3)
      model.fit(X_train, y_train)
      score = model.score(X_test, y_test)
      print(f'model score: {score}')
  
output:     return score