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 should take a string as input and return a list of tuples where each tuple contains a word and its frequency, sorted by frequency in descending order. If the given text is empty, the function should return an empty list.
  assert get_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 get_top_10_words("This is a test. This is only a test.")==[('This', 2), ('is', 2), ('a', 2), ('test.', 2), ('only', 1)]
  assert get_top_10_words("")==[]
  assert get_top_10_words("A a A a A a B b b b C c c D d E e F f G g H h")==[('A', 6), ('a', 6), ('b', 4), ('c', 3), ('B', 3), ('C', 2), ('d', 2), ('e', 2), ('f', 2), ('g', 2)]
output: def get_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_freq = sorted(freq.items(), key=lambda item: item[1], reverse=True)
      return sorted_freq[:10]