input: Write a function to generate n-grams of a given text with a specified window size. If the text is an empty string, return an empty Counter object. The function should use the Counter object from the collections module to count the frequency of each n-gram.
  assert generate_ngrams("The quick brown fox jumps over the lazy dog", 3) == Counter({'the quick brown': 5, 'quick brown fox': 4, 'brown fox jumps': 3, 'fox jumps over': 2, 'jumps over the': 1, 'over the lazy': 1, 'the lazy dog': 1})
  assert generate_ngrams("Hello world", 2) == Counter({'hello world': 1})
  assert generate_ngrams("", 3) == Counter()
  assert generate_ngrams("Single", 1) == Counter({'single': 1})
output: def generate_ngrams(text, n):
      from collections import Counter
      if not text:
          return Counter()
      words = text.split()
      ngrams = [' '.join(words[i:i+n]) for i in range(len(words) - n + 1)]
      return Counter(ngrams)