input: Write a function to generate a Python script that sorts the given list of words in alphabetical order and prints the sorted list. The function should take a list of words as input, sort them, and return the sorted list.
  
  def sort_words(words):
      words.sort()
      return words
  
  assert sort_words(['bubble', 'selection', 'quicksort', 'insertion']) == ['bubble', 'insertion', 'quicksort', 'selection']
  assert sort_words(['apple', 'banana', 'cherry', 'date']) == ['apple', 'banana', 'cherry', 'date']
  assert sort_words(['zebra', 'yak', 'xylophone', 'walrus']) == ['walrus', 'xylophone', 'yak', 'zebra']
  assert sort_words([]) == []
  assert sort_words(['cat', 'bat', 'rat']) == ['bat', 'cat', 'rat']
output: def sort_words(words):
      words.sort()
      return words