input: Write a function to invert a dictionary, where the keys of the original dictionary become the values in the new dictionary and vice versa. If the original dictionary has multiple keys with the same value, the new dictionary should contain a list of those keys under that value. If the input dictionary is empty, return an empty dictionary.
  assert invert_dictionary({'a': 1, 'b': 2, 'c': 3}) == {1: ['a'], 2: ['b'], 3: ['c']}
  assert invert_dictionary({'a': 1, 'b': 2, 'c': 1}) == {1: ['a', 'c'], 2: ['b']}
  assert invert_dictionary({}) == {}
output: def invert_dictionary(d):
      inverted = {}
      for key, value in d.items():
          if value in inverted:
              inverted[value].append(key)
          else:
              inverted[value] = [key]
      return inverted