input: Write a function to classify emails from the Enron Spam Dataset as either spam or non-spam using Python. This function should load the dataset, preprocess it using a bag of words model, train an SVM classifier, and then evaluate the precision of the model. The function should be named `classify_spam` and return the precision score.
  assert classify_spam("spam.csv") > 0.8
  assert classify_spam("spam.csv") < 1.0
  assert classify_spam("empty.csv") is None
output: def classify_spam(file_path):
      try:
          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
  
          df = pd.read_csv(file_path)
          if df.empty:
              return None
          
          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)
          
          svm = SVC(kernel='linear')
          svm.fit(X_train, y_train)
          
          y_pred = svm.predict(X_test)
          precision = precision_score(y_test, y_pred, pos_label='spam')
          
          return precision
      except Exception as e:
          return None