input: Write a class to read in a text file and count the frequency of each word. If the file is empty, return an empty dictionary.
  
  class WordCounter:
      def __init__(self, filename):
          self.word_counts = {}
          self.filename = filename
          self.process_file()
  
      def process_file(self):
          if self.filename is None:
              return
          with open(self.filename) as f:
              for line in f:
                  words = line.split()
                  for word in words:
                      if word in self.word_counts:
                          self.word_counts[word] += 1
                      else:
                          self.word_counts[word] = 1
  
      def get_word_counts(self):
          return self.word_counts
  
  assert WordCounter("nonexistent_file.txt") is not None
  assert WordCounter(None).get_word_counts() == {}
  assert WordCounter('test.txt').get_word_counts() == {"hello": 2, "world": 1}
output: class WordCounter:
      def __init__(self, filename):
          self.word_counts = {}
          self.filename = filename
          self.process_file()
  
      def process_file(self):
          if self.filename is None:
              return
          try:
              with open(self.filename) as f:
                  for line in f:
                      words = line.split()
                      for word in words:
                          if word in self.word_counts:
                              self.word_counts[word] += 1
                          else:
                              self.word_counts[word] = 1
          except FileNotFoundError:
              pass
  
      def get_word_counts(self):
          return self.word_counts