input: Write a function to analyze the sentiment of a given text. The function should tokenize the text, stem the tokens, remove punctuation and stopwords, and then return the polarity score of the cleaned text. If the input text is empty, return a polarity score of {'neg': 0.0, 'neu': 0.0, 'pos': 0.0, 'compound': 0.0}.
  assert sentiment_analyzer("I love this product! It's amazing.")=={'neg': 0.0, 'neu': 0.254, 'pos': 0.746, 'compound': 0.8316}
  assert sentiment_analyzer("I hate this product! It's terrible.")=={'neg': 0.674, 'neu': 0.326, 'pos': 0.0, 'compound': -0.6896}
  assert sentiment_analyzer("This is just mediocre.")=={'neg': 0.0, 'neu': 0.649, 'pos': 0.351, 'compound': 0.0153}
  assert sentiment_analyzer("")=={'neg': 0.0, 'neu': 0.0, 'pos': 0.0, 'compound': 0.0}
output: from nltk.tokenize import word_tokenize
  from nltk.stem import PorterStemmer
  from nltk.corpus import stopwords
  from nltk.sentiment.vader import SentimentIntensityAnalyzer
  import string
  
  def sentiment_analyzer(text):
      if not text:
          return {'neg': 0.0, 'neu': 0.0, 'pos': 0.0, 'compound': 0.0}
      
      tokens = word_tokenize(text.lower())
      stemmer = PorterStemmer()
      stop_words = set(stopwords.words('english'))
      cleaned_tokens = [stemmer.stem(word) for word in tokens if word.isalnum() and word not in stop_words]
      
      cleaned_text = ' '.join(cleaned_tokens)
      analyzer = SentimentIntensityAnalyzer()
      sentiment_scores = analyzer.polarity_scores(cleaned_text)
      
      return sentiment_scores