input: Write a function to implement an autocomplete system that takes an input text and returns the top 5 predicted words based on the input. The function should generate word candidates from the input text, filter and rank them. If no valid candidates are found, return an empty list.
  assert autocomplete("he")==["hello", "help", "hero", "herald", "height"]
  assert autocomplete("com")==["computer", "communication", "company", "commodity", "common"]
  assert autocomplete("xyz")==[]
  assert autocomplete("")==[]
output: def autocomplete(input_text):
      word_list = ["hello", "help", "hero", "herald", "height", "computer", "communication", "company", "commodity", "common"]
      candidates = [word for word in word_list if word.startswith(input_text)]
      return sorted(candidates)[:5] if candidates else []