input:                            
  def classify_emails(dataset_path: str) -> float:
      """ Classify emails from the Enron Spam Dataset as either spam or non-spam using a Support Vector Machine (SVM) model.
      The function loads the dataset, splits it into train and test sets, creates a bag of words model, trains an SVM classifier,
      and returns the precision score of the model on the test set.
      >>> classify_emails("spam.csv")
      0.95
      >>> classify_emails("another_spam.csv")
      0.92
      """
output:     import pandas as pd
      from sklearn.model_selection import train_test_split
      from sklearn.feature_extraction.text import CountVectorizer
      from sklearn.svm import SVC
      from sklearn.metrics import precision_score
  
      # Load the dataset
      df = pd.read_csv(dataset_path, encoding='latin-1')
      df = df[['v1', 'v2']]
      df.columns = ['label', 'text']
  
      # Split the dataset into train and test sets
      X_train, X_test, y_train, y_test = train_test_split(df['text'], df['label'], test_size=0.2, random_state=42)
  
      # Create a bag of words model
      vectorizer = CountVectorizer()
      X_train_vec = vectorizer.fit_transform(X_train)
      X_test_vec = vectorizer.transform(X_test)
  
      # Train an SVM classifier
      svm = SVC(kernel='linear')
      svm.fit(X_train_vec, y_train)
  
      # Predict on the test set
      y_pred = svm.predict(X_test_vec)
  
      # Return the precision score
      return precision_score(y_test, y_pred, pos_label='spam')