input: Write a function that reads a text file and counts the frequency of each word. The function should return a dictionary where the keys are words and the values are their respective frequencies.
  
  def word_frequency_counter(filename):
      word_counts = {}
      with open(filename) as f:
          for line in f:
              words = line.split()
              for word in words:
                  if word in word_counts:
                      word_counts[word] += 1
                  else:
                      word_counts[word] = 1
      return word_counts
  
  assert word_frequency_counter("test.txt") == {"the": 2, "quick": 1, "brown": 1, "fox": 1, "jumps": 1, "over": 1, "lazy": 1, "dog": 1}
  assert word_frequency_counter("empty.txt") == {}
  assert word_frequency_counter("single_word.txt") == {"hello": 5}
output: def word_frequency_counter(filename):
      word_counts = {}
      with open(filename) as f:
          for line in f:
              words = line.split()
              for word in words:
                  if word in word_counts:
                      word_counts[word] += 1
                  else:
                      word_counts[word] = 1
      return word_counts