input: Write a python function to count the frequency of words in a given text and return the top N most frequent words.
  assert count_top_words("This is a test. We are testing the frequency of certain words in this sentence", 3) == [('this', 2), ('is', 1), ('a', 1)]
  assert count_top_words("a a a b b c", 2) == [('a', 3), ('b', 2)]
  assert count_top_words("word word word frequency frequency test", 1) == [('word', 3)]
output: def count_top_words(text, N):
      from collections import Counter
      import re
      
      # Normalize the text to lower case and split into words
      words = re.findall(r'\b\w+\b', text.lower())
      
      # Count the frequency of each word
      word_counts = Counter(words)
      
      # Get the N most common words
      top_n_words = word_counts.most_common(N)
      
      return top_n_words