input: Write a function that takes a dictionary as an argument and returns an inverted dictionary where each value becomes a key and the corresponding value is a list of keys from the original dictionary that mapped to that value. If the given dictionary is empty, the function should return an empty 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({})=={}
  assert invert_dictionary({'a': 1, 'b': 2, 'c': 3})=={1: ['a'], 2: ['b'], 3: ['c']}
  assert invert_dictionary({'a': 1, 'b': 1, 'c': 3})=={1: ['a', 'b'], 3: ['c']}
  assert invert_dictionary({'a': 'apple', 'b': 'banana', 'c': 'apple'})=={'apple': ['a', 'c'], 'banana': ['b']}
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