input: Write a function named invert_dictionary that takes a dictionary as an argument and returns an inverted dictionary where the keys are the original dictionary's values and the values are lists of the original dictionary's keys that mapped to those values.
  
  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({"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