input: Write a function to generate n-grams of the given text with a specified window size. If the given text is empty or the window size is less than or equal to 0, return an empty Counter object.
  assert generate_ngrams("The quick brown fox jumps over the lazy dog", 3)==Counter({'the quick brown': 3, 'quick brown fox': 2, 'over the lazy': 1, 'brown fox jumps': 1, 'fox jumps over': 1, 'the lazy dog': 1, 'jumps over the': 1, 'quick brown fox jumps': 1})
  assert generate_ngrams("The quick brown fox", 2)==Counter({'the quick': 2, 'quick brown': 2, 'brown fox': 2})
  assert generate_ngrams("", 3)==Counter()
  assert generate_ngrams("The quick brown fox", -1)==Counter()
  assert generate_ngrams("The quick brown fox", 0)==Counter()
output: from collections import Counter
  
  def generate_ngrams(text, window_size):
      if not text or window_size <= 0:
          return Counter()
      words = text.split()
      ngrams = Counter()
      for i in range(len(words) - window_size + 1):
          ngram = ' '.join(words[i:i+window_size])
          ngrams[ngram] += 1
      return ngrams