input: Write a function to implement an autocomplete system that predicts words based on the given input text. The function should generate word candidates, filter them, rank them, and return the top 5 predictions. If the sorted_words list contains fewer than 5 words, return all available words.
  assert autocomplete("hel")==['help', 'hello', 'hell', 'helmet', 'helium']
  assert autocomplete("pro")==['program', 'project', 'professional', 'programming', 'process']
  assert autocomplete("a")==['about', 'all', 'and', 'also', 'any']
  assert autocomplete("z")==['zoo', 'zip', 'zero', 'zone', 'zoom']
  assert autocomplete("xyz")==[]
output: def autocomplete(prefix):
      sorted_words = ['about', 'all', 'and', 'also', 'any', 'help', 'hello', 'hell', 'helmet', 'helium', 'program', 'project', 'professional', 'programming', 'process', 'zoo', 'zip', 'zero', 'zone', 'zoom']
      candidates = [word for word in sorted_words if word.startswith(prefix)]
      candidates.sort()
      return candidates[:5]