input: Write a python function to generate a classification model to classify spam messages using logistic regression.
  assert train_and_test_model('spam.csv') > 0.8
  assert train_and_test_model('another_spam.csv') > 0.75
output: def train_and_test_model(csv_file):
      import pandas as pd
      from sklearn.model_selection import train_test_split
      from sklearn.feature_extraction.text import CountVectorizer
      from sklearn.linear_model import LogisticRegression
      from sklearn.metrics import accuracy_score
      
      # Load the dataset
      df = pd.read_csv(csv_file)
      
      # Assuming the CSV file has 'message' and 'label' columns
      X = df['message']
      y = df['label']
      
      # Split the dataset into training and testing sets
      X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
      
      # Convert text data into numerical data
      vectorizer = CountVectorizer()
      X_train_vectorized = vectorizer.fit_transform(X_train)
      X_test_vectorized = vectorizer.transform(X_test)
      
      # Initialize the Logistic Regression model
      model = LogisticRegression()
      
      # Train the model
      model.fit(X_train_vectorized, y_train)
      
      # Make predictions
      y_pred = model.predict(X_test_vectorized)
      
      # Calculate the accuracy
      accuracy = accuracy_score(y_test, y_pred)
      
      return accuracy