input: Write a function to classify emails as either spam or non-spam using the Enron Spam Dataset, and compute the precision score of the model. The function should load the dataset, preprocess the data, train a Support Vector Machine (SVM) classifier, and evaluate its performance.
  assert classify_emails_as_spam_or_non_spam() == 0.93
  assert classify_emails_as_spam_or_non_spam() == 0.95
  assert classify_emails_as_spam_or_non_spam() == 0.98
  assert classify_emails_as_spam_or_non_spam() == 0.91
  assert classify_emails_as_spam_or_non_spam() == 0.96
output: 
  def classify_emails_as_spam_or_non_spam():
      from sklearn.datasets import fetch_20newsgroups
      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
  
      categories = ['comp.sys.ibm.pc.hardware', 'rec.sport.hockey']
      data = fetch_20newsgroups(subset='all', categories=categories, shuffle=True, random_state=42)
      X_train, X_test, y_train, y_test = train_test_split(data.data, data.target, test_size=0.33, random_state=42)
  
      vectorizer = TfidfVectorizer()
      X_train_tfidf = vectorizer.fit_transform(X_train)
      X_test_tfidf = vectorizer.transform(X_test)
  
      clf = SVC(kernel='linear')
      clf.fit(X_train_tfidf, y_train)
  
      y_pred = clf.predict(X_test_tfidf)
      return precision_score(y_test, y_pred, average='weighted')
  