input: Write a function to take a dictionary as an argument and return an inverted dictionary where the keys of the original dictionary become the values of the new dictionary, and the values of the original dictionary become the keys of the new dictionary. If the original dictionary contains multiple keys with the same value, the new dictionary should have those keys stored in a list for the corresponding value.
  
  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': 10, 'y': 20, 'z': 10}) == {10: ['x', 'z'], 20: ['y']}
  assert invert_dictionary({'apple': 'fruit', 'carrot': 'vegetable'}) == {'fruit': ['apple'], 'vegetable': ['carrot']}
  assert invert_dictionary({}) == {}
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