input: Write a python function to generate n-grams from a given text and then create a summary of the most frequent n-grams.
  assert generate_summary('The quick brown fox jumps over the lazy dog. The quick brown fox is quick.', 2) == 'quick brown The quick '
  assert generate_summary('Alice loves programming. Programming is fun. Alice enjoys learning.', 2) == 'Alice loves loves programming. Programming is '
output: def generate_summary(text, n):
      from collections import Counter
      words = text.split()
      ngrams = [' '.join(words[i:i+n]) for i in range(len(words)-n+1)]
      freq = Counter(ngrams)
      most_common_ngrams = freq.most_common()
      summary = ' '.join([ngram for ngram, count in most_common_ngrams[:2]])
      return summary + ' '