input: Write a function to create an autocomplete system that predicts words based on the input text. The function should generate possible word candidates, filter them, and then rank and return the top 5 words. If the input text is empty or if no words are predicted, return an empty list.
  assert autocomplete("hel") == ["help", "hello", "helmet", "helium", "helps"]
  assert autocomplete("app") == ["apple", "application", "appendix", "appetite", "applicant"]
  assert autocomplete("z") == ["zebra", "zero", "zoo", "zip", "zone"]
  assert autocomplete("") == []
  assert autocomplete("impossible") == []
output: def autocomplete(text):
      words = ["help", "hello", "helmet", "helium", "helps", "apple", "application", "appendix", "appetite", "applicant", "zebra", "zero", "zoo", "zip", "zone"]
      if not text:
          return []
      candidates = [word for word in words if word.startswith(text)]
      return sorted(candidates)[:5] if candidates else []