input: Write a python function to find the top N most frequent words in a given text.
  assert top_n_words("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", 5) == [('dolor', 1), ('Lorem', 1), ('ipsum', 1), ('amet', 1), ('consectetur', 1)]
  assert top_n_words("hello world hello hello world", 2) == [('hello', 3), ('world', 2)]
  assert top_n_words("a a a b b c", 3) == [('a', 3), ('b', 2), ('c', 1)]
output: from collections import Counter
  
  def top_n_words(text, n):
      words = text.split()
      word_counts = Counter(words)
      most_common_words = word_counts.most_common(n)
      return most_common_words