input: Write a function to create and evaluate an AI model in Python to classify emails from the Enron Spam Dataset as either spam or non-spam using Support Vector Machine (SVM) with a linear kernel. The function should return the precision score of the model on the test set.
  assert spam_classifier()==0.98
  assert spam_classifier()==0.97
  assert spam_classifier()==0.99
  assert spam_classifier()==0.96
  assert spam_classifier()==1.00
output: 
  def spam_classifier():
      from sklearn.feature_extraction.text import TfidfVectorizer
      from sklearn.model_selection import train_test_split
      from sklearn.svm import SVC
      from sklearn.metrics import precision_score
      import pandas as pd
      import numpy as np
  
      # Load the dataset
      df = pd.read_csv('enron_spam_data.csv')
      X = df['text']
      y = df['label']
  
      # Split the dataset
      X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
  
      # Vectorize the text data
      vectorizer = TfidfVectorizer()
      X_train = vectorizer.fit_transform(X_train)
      X_test = vectorizer.transform(X_test)
  
      # Train the SVM model
      model = SVC(kernel='linear')
      model.fit(X_train, y_train)
  
      # Predict and evaluate
      y_pred = model.predict(X_test)
      precision = precision_score(y_test, y_pred, pos_label='spam')
  
      return precision
  