input: Write a function to extract the top 10 most frequent words from a given text using natural language processing in Python. The function should return a list of tuples where each tuple contains a word and its frequency. If the text is empty or has fewer than 10 unique words, the function should return all words found in the text along with their frequencies.
  assert top_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 top_frequent_words("Python is great, Python is fun, Python is easy, Python is widely used.") == [('is', 4), ('Python', 4), ('widely', 1), ('used.', 1), ('fun,', 1), ('easy,', 1), ('great,', 1)]
  assert top_frequent_words("") == []
  assert top_frequent_words("one one one one one one one one one one two two two two two two two two two two three three three three three three three three three three") == [('one', 10), ('two', 10), ('three', 10)]
output: def top_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_freq = sorted(freq.items(), key=lambda item: item[1], reverse=True)
      
      return sorted_freq[:10]