input: Write a function to classify emails from the Enron Spam Dataset as either spam or non-spam using a Support Vector Machine (SVM) model with a linear kernel. The function should load the dataset, preprocess the text using a bag-of-words model, train the model, and then return the precision score of the model on the test set.
  assert classify_emails('spam.csv') == 0.98
  assert classify_emails('test.csv') == 0.90
  assert classify_emails('empty.csv') == None
output: def classify_emails(filename):
      import pandas as pd
      from sklearn.feature_extraction.text import CountVectorizer
      from sklearn.model_selection import train_test_split
      from sklearn.svm import SVC
      from sklearn.metrics import precision_score
  
      try:
          df = pd.read_csv(filename)
      except:
          return None
  
      if df.empty:
          return None
  
      df['label'] = df['label'].map({'spam': 1, 'non-spam': 0})
      X = df['text']
      y = df['label']
  
      vectorizer = CountVectorizer()
      X = vectorizer.fit_transform(X)
  
      X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
  
      model = SVC(kernel='linear')
      model.fit(X_train, y_train)
  
      y_pred = model.predict(X_test)
      return precision_score(y_test, y_pred)