input: Write a function to read in a textfile and count the frequency of each word. Return a dictionary where the keys are words and the values are their corresponding frequencies. If the file is empty, return an empty dictionary.
  assert WordCounter("sample.txt").get_word_counts() == {'The': 1, 'cat': 2, 'in': 1, 'the': 1, 'hat': 1}
  assert WordCounter("empty.txt").get_word_counts() == {}
  assert WordCounter("numbers.txt").get_word_counts() == {'1': 2, '2': 2, '3': 1}
  assert WordCounter("special_chars.txt").get_word_counts() == {'!!!': 1, 'hello': 2, 'world': 2, '!!!': 2}
  assert WordCounter("nonexistent.txt").get_word_counts() == {}
output: def get_word_counts(self):
      word_counts = {}
      try:
          with open(self.filename, 'r') as file:
              for line in file:
                  words = line.split()
                  for word in words:
                      if word in word_counts:
                          word_counts[word] += 1
                      else:
                          word_counts[word] = 1
      except FileNotFoundError:
          pass
      return word_counts