input: Write a function to extract the top 10 most frequent words from a given text. The function should return a list of tuples where each tuple contains a word and its frequency in the text. If the text is empty, the function should return an empty list.
  from collections import Counter
  
  def extract_frequent_words(text):
      if not text:
          return []
      words = text.split()
      counter = Counter(words)
      return counter.most_common(10)
  
  assert extract_frequent_words("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")==[('dolor', 1), ('Lorem', 1), ('ipsum', 1), ('amet', 1), ('consectetur', 1), ('adipiscing', 1), ('elit,', 1), ('sed', 1), ('do', 1), ('eiusmod', 1)]
  assert extract_frequent_words("")==[]
  assert extract_frequent_words("apple apple banana banana banana cherry cherry cherry cherry")==[('banana', 3), ('cherry', 4), ('apple', 2)]
  assert extract_frequent_words("a a a b b c")==[('a', 3), ('b', 2), ('c', 1)]
  assert extract_frequent_words("the quick brown fox jumps over the lazy dog")==[('the', 2), ('quick', 1), ('brown', 1), ('fox', 1), ('jumps', 1), ('over', 1), ('lazy', 1), ('dog', 1)]
output: from collections import Counter
  
  def extract_frequent_words(text):
      if not text:
          return []
      words = text.split()
      counter = Counter(words)
      return counter.most_common(10)