input: Write a python function to train a Naive Bayes classifier for spam detection using a CountVectorizer and a given dataset.
  assert isinstance(train_spam_classifier('spam_data.csv'), MultinomialNB)
  assert train_spam_classifier('spam_data.csv').predict(cv.transform(['Free money now!!!'])) in [0, 1]
  assert train_spam_classifier('spam_data.csv').predict(cv.transform(['Hello, how are you?'])) in [0, 1]
output: def train_spam_classifier(file_path):
      import pandas as pd
      from sklearn.feature_extraction.text import CountVectorizer
      from sklearn.naive_bayes import MultinomialNB
      from sklearn.model_selection import train_test_split
      
      # Load dataset
      data = pd.read_csv(file_path)
      
      # Assuming dataset has 'text' for message and 'label' for classification
      texts = data['text']
      labels = data['label']
      
      # Split the data
      X_train, X_test, y_train, y_test = train_test_split(texts, labels, test_size=0.25, random_state=42)
      
      # Vectorize the text data
      cv = CountVectorizer()
      X_train_cv = cv.fit_transform(X_train)
      X_test_cv = cv.transform(X_test)
      
      # Train the Naive Bayes classifier
      nb_classifier = MultinomialNB()
      nb_classifier.fit(X_train_cv, y_train)
      
      return nb_classifier