input: Write a function to return a list of words that appear at least a given number of times in a provided list of words. The function should accept a list of words and an integer as input and return a list of words that meet the frequency requirement.
  assert frequent_words(['a', 'b', 'a', 'c', 'd', 'a', 'x', 'd', 'd'], 3)==['a', 'd']
  assert frequent_words(['a', 'b', 'a', 'c', 'd'], 2)==['a']
  assert frequent_words(['a', 'b', 'c', 'd', 'e'], 1)==['a', 'b', 'c', 'd', 'e']
  assert frequent_words(['a', 'a', 'a', 'a'], 4)==['a']
  assert frequent_words([], 1)==[]
output: def frequent_words(words, min_frequency):
      word_count = {}
      for word in words:
          if word in word_count:
              word_count[word] += 1
          else:
              word_count[word] = 1
      result = [word for word, count in word_count.items() if count >= min_frequency]
      return result