input: Write a python function to generate a summary of a given text by extracting sentences that contain the most frequent words.
  assert summarize_text("This course gives an overview of natural language processing and how it can be used to analyze text. It will introduce some of the most common techniques like part-of-speech tagging, syntactic parsing, and named entity recognition. These techniques can be used to extract important information from text, classify documents, and generate summary documents.") == "This course gives an overview of natural language processing and how it can be used to analyze text. It will introduce some of the most common techniques like part-of-speech tagging, syntactic parsing, and named entity recognition. These techniques can be used to extract important information from text, classify documents, and generate summary documents."
  assert summarize_text("Natural language processing is an exciting field. This field includes techniques such as tokenization, parsing, and machine learning. These techniques can help us understand and generate human language.") == "Natural language processing is an exciting field. This field includes techniques such as tokenization, parsing, and machine learning. These techniques can help us understand and generate human language."
  assert summarize_text("The cat sat on the mat. The dog barked at the cat. The mat was very comfortable.") == "The cat sat on the mat. The dog barked at the cat."
output: def summarize_text(text):
      from collections import Counter
      import re
  
      # Tokenize text into sentences and words
      sentences = re.split(r'(?<!\w\.\w.)(?<![A-Z][a-z]\.)(?<=\.|\?)\s', text)
      words = re.findall(r'\w+', text.lower())
  
      # Get the most common words
      word_freq = Counter(words)
      most_common_words = {word for word, count in word_freq.most_common(5)}
  
      # Extract sentences that contain the most common words
      summary_sentences = []
      for sentence in sentences:
          sentence_words = set(re.findall(r'\w+', sentence.lower()))
          if most_common_words & sentence_words:
              summary_sentences.append(sentence)
  
      # Join the selected sentences to form the summary
      summary = ' '.join(summary_sentences)
      return summary