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 return a list of tuples where each tuple contains a word and its frequency. If the text is empty, the function should return an empty list.
  
  assert get_top_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_words("") == []
  assert get_top_words("apple orange apple banana banana banana") == [('banana', 3), ('apple', 2), ('orange', 1)]
  assert get_top_words("a a a a b b b c c d") == [('a', 4), ('b', 3), ('c', 2), ('d', 1)]
  assert get_top_words("word1 word2 word3 word4 word5 word6 word7 word8 word9 word10 word11 word12") == [('word1', 1), ('word2', 1), ('word3', 1), ('word4', 1), ('word5', 1), ('word6', 1), ('word7', 1), ('word8', 1), ('word9', 1), ('word10', 1)]
output: def get_top_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]