input: Write a function that takes a dictionary as an argument and returns an inverted dictionary where each value in the original dictionary becomes a key in the new dictionary, and the keys corresponding to that value are stored as a list of values in the new 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': 'apple', 'y': 'banana', 'z': 'apple'}) == {'apple': ['x', 'z'], 'banana': ['y']}
  assert invert_dictionary({}) == {}
  assert invert_dictionary({'one': 1, 'two': 2, 'three': 3}) == {1: ['one'], 2: ['two'], 3: ['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