input: def autocomplete(input_text: str) -> List[str]:
      """Given an input text, this function generates word candidates, filters them,
      ranks them, and returns the top 5 predicted words.
      >>> autocomplete("hel")
      ["hello", "help", "hell", "helmet", "helix"]
      >>> autocomplete("do")
      ["do", "dog", "done", "door", "dolphin"]
      """
output:     word_candidates = ["hello", "help", "hell", "helmet", "helix", "do", "dog", "done", "door", "dolphin"]
      filtered_words = [word for word in word_candidates if word.startswith(input_text)]
      ranked_words = sorted(filtered_words, key=lambda x: (-len(x), x))
      return ranked_words[:5]