input: Write a function to invert a dictionary, where each value becomes a key, and the key that it corresponds to becomes a list of values. If multiple keys have the same value, they should all appear in the corresponding list. If the input dictionary is empty, return an empty dictionary.
  
  def invert_dictionary(d):
      inverted_d = {}
      
      for key, value in d.items():
          if value not in inverted_d:
              inverted_d[value] = []
          inverted_d[value].append(key)
      
      return inverted_d
  
  assert invert_dictionary({'a': 1, 'b': 2, 'c': 1}) == {1: ['a', 'c'], 2: ['b']}
  assert invert_dictionary({'x': 'a', 'y': 'b', 'z': 'a'}) == {'a': ['x', 'z'], 'b': ['y']}
  assert invert_dictionary({}) == {}
  assert invert_dictionary({'one': 1, 'two': 2, 'three': 3}) == {1: ['one'], 2: ['two'], 3: ['three']}
  assert invert_dictionary({'one': '1', 'two': '2', 'three': '2'}) == {'1': ['one'], '2': ['two', 'three']}
output: def invert_dictionary(d):
      inverted_d = {}
      
      for key, value in d.items():
          if value not in inverted_d:
              inverted_d[value] = []
          inverted_d[value].append(key)
      
      return inverted_d