input: Write a python function to calculate the frequency of words in a given text.
  assert word_frequency("hello world hello")=={"hello": 2, "world": 1}
  assert word_frequency("test this function test it well")=={"test": 2, "this": 1, "function": 1, "it": 1, "well": 1}
  assert word_frequency("a quick brown fox jumps over the lazy dog")=={"a": 1, "quick": 1, "brown": 1, "fox": 1, "jumps": 1, "over": 1, "the": 1, "lazy": 1, "dog": 1}
output: def word_frequency(text):
      words = text.split()
      frequency = {}
      for word in words:
          if word in frequency:
              frequency[word] += 1
          else:
              frequency[word] = 1
      return frequency