code: def sort_list(items):
      track = {}
      def by_length(word1, word2):
          return len(word2) - len(word1)
      for item in items:
          cword = utils.word_count(item, all=True)
          if cword not in track:
              track[cword] = []
          track[cword].append(item)
      output = []
      for count in sorted(track.keys(), reverse=True):
          sort = sorted(track[count], key=len, reverse=True)
          output.extend(sort)
      return output