input: 
  def autocomplete(input_text: str) -> List[str]:
      """
      Given an input text, this function predicts and returns a list of the top 5 words that could continue the input text.
      Each step of the prediction process is handled by different helper functions:
      1. generate_candidates(input_text): Generates possible word candidates.
      2. filter_candidates(word_candidates): Filters the generated word candidates based on some criteria.
      3. rank_words(filtered_words): Ranks the filtered words based on their relevance to the input text.
      
      >>> autocomplete("how to")
      ['how to cook', 'how to learn', 'how to code', 'how to play', 'how to drive']
      >>> autocomplete("apple")
      ['apple store', 'apple watch', 'apple pie', 'apple iphone', 'apple macbook']
      """
  
output:     candidates = generate_candidates(input_text)
      filtered_candidates = filter_candidates(candidates)
      ranked_words = rank_words(filtered_candidates)
      return ranked_words[:5]