input: Write a python function to train a Naive Bayes model for spam detection.
  assert train_and_evaluate_model('spam_data.csv') > 0.9
output: def train_and_evaluate_model(csv_file):
      import pandas as pd
      from sklearn.feature_extraction.text import CountVectorizer
      from sklearn.model_selection import train_test_split
      from sklearn.naive_bayes import MultinomialNB
      from sklearn.metrics import accuracy_score
  
      # Load the dataset
      data = pd.read_csv(csv_file)
      
      # Assuming the CSV has 'message' and 'label' columns
      X = data['message']
      y = data['label']
      
      # Convert text data to numeric using CountVectorizer
      vectorizer = CountVectorizer()
      X = vectorizer.fit_transform(X)
      
      # Split the data into train and test sets
      X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
      
      # Train the Naive Bayes model
      model = MultinomialNB()
      model.fit(X_train, y_train)
      
      # Predict on the test set
      y_pred = model.predict(X_test)
      
      # Calculate the accuracy
      accuracy = accuracy_score(y_test, y_pred)
      
      return accuracy