input: def classify_emails(df: pd.DataFrame) -> float:
      """ Classify emails from the Enron Spam Dataset as spam or non-spam using an SVM model.
      The function loads the dataset, splits it into train and test sets, and trains an SVM classifier.
      Finally, it returns the precision score of the model on the test set.
      >>> df = pd.read_csv("spam.csv", encoding='iso-8859-1')
      >>> score = classify_emails(df)
      >>> type(score) == float
      True
      """
output:     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 = df[['v1', 'v2']]
      df = df.rename(columns={'v1': 'label', 'v2': 'text'})
      df['label'] = df['label'].map({'ham': 0, 'spam': 1})
  
      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)
      precision = precision_score(y_test, y_pred)
  
      return precision