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. The function should load the dataset, split it into training and testing sets, train the model, and then evaluate the model using precision score. Return the precision score as the output.
  assert round(classify_spam("spam.csv"), 2)==0.95
  assert round(classify_spam("spam.csv"), 2)==0.93
  assert round(classify_spam("spam.csv"), 2)==0.94
  assert round(classify_spam("spam.csv"), 2)==0.96
  assert round(classify_spam("incorrect_file.csv"), 2)==None
output: def classify_spam(file_path):
      try:
          import pandas as pd
          from sklearn.model_selection import train_test_split
          from sklearn.feature_extraction.text import TfidfVectorizer
          from sklearn.svm import SVC
          from sklearn.metrics import precision_score
          
          df = pd.read_csv(file_path)
          X = df['text']
          y = df['label']
          
          X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
          
          vectorizer = TfidfVectorizer()
          X_train_tfidf = vectorizer.fit_transform(X_train)
          X_test_tfidf = vectorizer.transform(X_test)
          
          svm = SVC()
          svm.fit(X_train_tfidf, y_train)
          
          y_pred = svm.predict(X_test_tfidf)
          precision = precision_score(y_test, y_pred, pos_label='spam')
          
          return precision
      except:
          return None