input: Write a function to generate n-grams of the given text with a specified window size. The function should return a Counter object containing the frequency of each n-gram.
  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("The quick brown fox jumps over the lazy dog", 2) == Counter({'the quick': 1, 'quick brown': 1, 'brown fox': 1, 'fox jumps': 1, 'jumps over': 1, 'over the': 1, 'the lazy': 1, 'lazy dog': 1})
  assert generate_ngrams("hello", 1) == Counter({'hello': 1})
  assert generate_ngrams("", 3) == Counter()
  assert generate_ngrams("one two one two three one two", 2) == Counter({'one two': 3, 'two one': 2, 'one two three': 1, 'two three one': 1, 'three one two': 1})
output: from collections import Counter
  
  def generate_ngrams(text, n):
      words = text.split()
      ngrams = [' '.join(words[i:i+n]) for i in range(len(words) - n + 1)]
      return Counter(ngrams)