input: Write a python function to generate a string of random words from a predefined list.
  assert len(generate_random_words(3).split())==3
  assert len(generate_random_words(5).split())==5
  assert all(word in ["hello", "world", "foobar", "python", "code"] for word in generate_random_words(10).split())
output: import random
  
  def generate_random_words(n):
      words = ["hello", "world", "foobar", "python", "code"]
      return ' '.join(random.choice(words) for _ in range(n))