input: Write a python function to preprocess text data by removing stopwords and lemmatizing the words.
  assert preprocess_text('The quick brown fox jumps over the lazy dog') == 'quick brown fox jump lazy dog'
  assert preprocess_text('Cats are running faster than dogs') == 'cat run faster dog'
  assert preprocess_text('He is playing football in the field') == 'play football field'
output: def preprocess_text(text):
      import nltk
      from nltk.corpus import stopwords
      from nltk.stem import WordNetLemmatizer
      from nltk.tokenize import word_tokenize
  
      nltk.download('punkt')
      nltk.download('wordnet')
      nltk.download('stopwords')
  
      stop_words = set(stopwords.words('english'))
      lemmatizer = WordNetLemmatizer()
      
      tokens = word_tokenize(text.lower())
      filtered_tokens = [word for word in tokens if word.isalpha() and word not in stop_words]
      lemmatized_tokens = [lemmatizer.lemmatize(word) for word in filtered_tokens]
  
      return ' '.join(lemmatized_tokens)