input: 
  def classify_emails_as_spam_or_non_spam() -> float:
      """ Create an AI model in Python to classify emails from the Enron Spam Dataset as either spam or non-spam.
      >>> classify_emails_as_spam_or_non_spam()
      0.97
      """
  
output:     
      import os
      import pandas as pd
      from sklearn.model_selection import train_test_split
      from sklearn.feature_extraction.text import TfidfVectorizer
      from sklearn.naive_bayes import MultinomialNB
      from sklearn.metrics import accuracy_score
  
      # Load the dataset
      data_dir = 'path_to_enron_spam_dataset'
      emails = []
      labels = []
  
      for label in ['spam', 'ham']:
          path = os.path.join(data_dir, label)
          for filename in os.listdir(path):
              with open(os.path.join(path, filename), 'r', encoding='latin-1') as file:
                  emails.append(file.read())
                  labels.append(label)
  
      # Create a DataFrame
      df = pd.DataFrame({'email': emails, 'label': labels})
  
      # Split the dataset into training and testing sets
      X_train, X_test, y_train, y_test = train_test_split(df['email'], df['label'], test_size=0.2, random_state=42)
  
      # Vectorize the text data
      vectorizer = TfidfVectorizer()
      X_train_vec = vectorizer.fit_transform(X_train)
      X_test_vec = vectorizer.transform(X_test)
  
      # Train the model
      model = MultinomialNB()
      model.fit(X_train_vec, y_train)
  
      # Predict and calculate accuracy
      y_pred = model.predict(X_test_vec)
      accuracy = accuracy_score(y_test, y_pred)
  
      return accuracy
  