input: Write a function to extract the top 10 most frequent words from a given text using Python. The function should return a list of tuples where each tuple contains a word and its frequency. If the given text is empty then return an empty list.
  
  assert top_10_frequent_words("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.") == [('Lorem', 1), ('ipsum', 1), ('dolor', 1), ('sit', 1), ('amet,', 1), ('consectetur', 1), ('adipiscing', 1), ('elit,', 1), ('sed', 1), ('do', 1)]
  assert top_10_frequent_words("") == []
  assert top_10_frequent_words("This is a test. This is only a test.") == [('This', 2), ('is', 2), ('a', 2), ('test.', 2), ('only', 1)]
  assert top_10_frequent_words("The quick brown fox jumps over the lazy dog") == [('The', 1), ('quick', 1), ('brown', 1), ('fox', 1), ('jumps', 1), ('over', 1), ('the', 1), ('lazy', 1), ('dog', 1)]
  assert top_10_frequent_words("Python is great. Python is fun. Python is awesome.") == [('Python', 3), ('is', 3), ('great.', 1), ('fun.', 1), ('awesome.', 1)]
output: def top_10_frequent_words(text):
      if not text:
          return []
      words = text.split()
      freq = {}
      for word in words:
          if word in freq:
              freq[word] += 1
          else:
              freq[word] = 1
      sorted_words = sorted(freq.items(), key=lambda x: x[1], reverse=True)
      return sorted_words[:10]