input: from typing import List
  
  def autocomplete(input_text: str) -> List[str]:
      """Returns a list of the top 5 words that would autocomplete the given input text string.
      The function uses internal functions to generate and filter possible word completions, 
      as well as to rank them before returning the best 5.
      >>> autocomplete('appl')
      ['apple', 'apples', 'apply', 'applicant', 'application']
      >>> autocomplete('dog')
      ['dog', 'dogs', 'doggy', 'doghouse', 'dogged']
      """
output:     words = ['apple', 'apples', 'apply', 'applicant', 'application', 'dog', 'dogs', 'doggy', 'doghouse', 'dogged']
      possible_completions = [word for word in words if word.startswith(input_text)]
      possible_completions.sort()
      return possible_completions[:5]