input: Write a function that takes a dictionary as an argument and returns an inverted dictionary. The inverted dictionary should have values as keys and lists of the original keys as values. If a value appears more than once in the original dictionary, the inverted dictionary should have a list of corresponding keys for that 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': 2})=={1: ['a'], 2: ['b', 'c']}
  assert invert_dictionary({'a': 'apple', 'b': 'banana', 'c': 'apple'})=={'apple': ['a', 'c'], 'banana': ['b']}
  assert invert_dictionary({})=={}
  assert invert_dictionary({'a': 1})=={1: ['a']}
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