input: Write a function to implement an autocomplete system that predicts words based on the input text. The function should generate word candidates from the input text, filter them, rank them, and return the top 5 predictions.
  assert autocomplete("hel") == ["hello", "help", "hell", "helped", "helper"]
  assert autocomplete("go") == ["good", "going", "goat", "goal", "goes"]
  assert autocomplete("app") == ["apple", "application", "apply", "appear", "approach"]
  assert autocomplete("the") == ["the", "then", "there", "their", "thence"]
  assert autocomplete("") == []
output: def autocomplete(text):
      word_list = ["hello", "help", "hell", "helped", "helper", "good", "going", "goat", "goal", "goes", "apple", "application", "apply", "appear", "approach", "the", "then", "there", "their", "thence"]
      candidates = [word for word in word_list if word.startswith(text)]
      candidates.sort()
      return candidates[:5]