input: Write a python function to invert a dictionary, swapping its keys and values.
  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({1: 'one', 2: 'two', 3: 'one'}) == {'one': [1, 3], 'two': [2]}
output: def invert_dictionary(d):
      inverted = {}
      for key, value in d.items():
          if value not in inverted:
              inverted[value] = []
          inverted[value].append(key)
      return inverted