input: Write a function to generate n-grams of the given text with a specified window size. The function should return a Counter object that counts the occurrences of each n-gram.
  
  def generate_ngrams(text, window_size):
      text = text.lower().split(' ')
      ngrams = []
      for n in range(window_size, len(text)+1):
          for i in range(len(text)-n+1):
              ngrams.append(' '.join(text[i:i+n]))
      return Counter(ngrams)
  
  from collections import Counter
  
  assert generate_ngrams("The quick brown fox jumps over the lazy dog", 3) == Counter({'the quick brown': 1, 'quick brown fox': 1, 'brown fox jumps': 1, 'fox jumps over': 1, 'jumps over the': 1, 'over the lazy': 1, 'the lazy dog': 1})
  assert generate_ngrams("This is a test", 2) == Counter({'this is': 1, 'is a': 1, 'a test': 1})
  assert generate_ngrams("Python is fun and powerful", 3) == Counter({'python is fun': 1, 'is fun and': 1, 'fun and powerful': 1})
  assert generate_ngrams("Repeat repeat repeat", 1) == Counter({'repeat': 3})
  assert generate_ngrams("Space the final frontier", 4) == Counter({'space the final frontier': 1})
  assert generate_ngrams("", 3) == Counter()
output: def generate_ngrams(text, window_size):
      text = text.lower().split(' ')
      ngrams = []
      for n in range(window_size, len(text)+1):
          for i in range(len(text)-n+1):
              ngrams.append(' '.join(text[i:i+n]))
      return Counter(ngrams)