input: Write a function to create an AI model in Python to classify emails from the Enron Spam Dataset as either spam or non-spam. The function should load the dataset, preprocess the data, train a Support Vector Machine (SVM) model, and return the precision score of the model on the test set.
  assert classify_emails("spam.csv") > 0.85
  assert classify_emails("spam2.csv") > 0.80
  assert classify_emails("empty.csv") == 0.0
  assert classify_emails("small_dataset.csv") > 0.80
  assert classify_emails("test_spam.csv") > 0.85
output: 
  def classify_emails(file_path):
      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
  
      try:
          df = pd.read_csv(file_path)
      except:
          return 0.0
  
      if df.empty:
          return 0.0
  
      df['label'] = df['label'].map({'spam': 1, 'non-spam': 0})
      X_train, X_test, y_train, y_test = train_test_split(df['text'], df['label'], 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(kernel='linear')
      svm.fit(X_train_tfidf, y_train)
  
      y_pred = svm.predict(X_test_tfidf)
      return precision_score(y_test, y_pred)
  