code: def rank(words: List[str], exclude_stopwords: bool = False) -> Counter:
      
      if not words:
          return None
  
      if exclude_stopwords:
          words = [word for word in words if word not in _STOPWORDS]
  
      return Counter(words)
docs: Sort words by frequency
  
      :param list words: a list of words
      :param bool exclude_stopwords: exclude stopwords
      :return: Counter