input: Write a function to return a list of words that appear at least n times in a given list of words. Use the Counter class from the collections module to count the occurrences of each word. If the input list is empty, return an empty list.
  assert frequent_words(['a', 'b', 'a', 'c', 'd', 'a', 'x', 'd', 'd'], 3) == ['a', 'd']
  assert frequent_words(['x', 'y', 'y', 'x', 'z'], 2) == ['x', 'y']
  assert frequent_words(['t', 't', 't', 't'], 4) == ['t']
  assert frequent_words(['p', 'q', 'r'], 2) == []
  assert frequent_words([], 1) == []
output: def frequent_words(words, n):
      from collections import Counter
      if not words:
          return []
      word_counts = Counter(words)
      return [word for word, count in word_counts.items() if count >= n]