input: Write a python function to summarize a given text by identifying and using the most frequent words.
  assert summarize("This is a test. This test is only a test.") == " This is a test This test is only a test"
  assert summarize("Hello world. Hello. World is big.") == " Hello world Hello World is big"
  assert summarize("Python is great. Python is dynamic. Python is easy to learn.") == " Python is great Python is dynamic Python is easy to learn"
output: def summarize(text):
      from collections import Counter
      import re
  
      words = re.findall(r'\w+', text.lower())
      freq_words = [word for word, count in Counter(words).most_common(2)]
      sentences = text.split('. ')
  
      summary = []
      for sentence in sentences:
          sentence_words = re.findall(r'\w+', sentence.lower())
          if any(word in sentence_words for word in freq_words):
              summary.append(sentence.strip())
  
      return '. '.join(summary)