input: from typing import List
  
  def sentiment_analyzer(text: str) -> dict:
      """Analyze the sentiment of a given text by tokenizing it, stemming each word, 
      removing punctuation and stopwords, and then computing the polarity score.
      >>> sentiment_analyzer("I love this product! It's amazing.")
      {'neg': 0.0, 'neu': 0.288, 'pos': 0.712, 'compound': 0.8516}
      >>> sentiment_analyzer("This movie was terrible, I hated every minute of it.")
      {'neg': 0.642, 'neu': 0.358, 'pos': 0.0, 'compound': -0.7579}
      """
output:     from nltk.tokenize import word_tokenize
      from nltk.stem import PorterStemmer
      from nltk.corpus import stopwords
      from nltk.sentiment import SentimentIntensityAnalyzer
      import string
  
      # Tokenize the text
      tokens = word_tokenize(text.lower())
  
      # Remove punctuation
      tokens = [word for word in tokens if word not in string.punctuation]
  
      # Remove stopwords
      stop_words = set(stopwords.words('english'))
      tokens = [word for word in tokens if word not in stop_words]
  
      # Stem each word
      stemmer = PorterStemmer()
      tokens = [stemmer.stem(word) for word in tokens]
  
      # Join tokens back into a single string
      processed_text = ' '.join(tokens)
  
      # Compute sentiment scores
      sia = SentimentIntensityAnalyzer()
      sentiment_scores = sia.polarity_scores(processed_text)
  
      return sentiment_scores