input: Write a function to create a natural language processing application in Python that extracts the top 10 most frequent words from a given text. The function takes a string as input and returns a list of tuples where each tuple represents a word and its frequency. If the input text is empty, it should return an empty list.
  assert extract_top_10_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_top_10_words("Hello world Hello world")==[('Hello', 2), ('world', 2)]
  assert extract_top_10_words("")==[]
output: def extract_top_10_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]