code: def total_ingredient_amounts(self):
          
          totals = defaultdict(int)
          for id, meta, amount in self.ingredients:
              totals[(id, meta)] += amount
          return totals
docs: Returns:
              dict: In the form { (item_id, metadata) -> amount }